view raw
gabriel giovanini gabriel giovanini - 11 months ago 45
Ruby Question

How to create a homebrew formula for a Mono based application?

I am trying to create a homebrew formula for mono console applicatoin

This is my formula so far:

class Fchan < Formula
desc "4chan image downloader"
homepage ""
url ""
version "0.1.2"
sha256 "00f46139b6ba50dbbf178b123ab8f54e225e645eb9aebbb5d22031f8ef3cba3e"

def install
system "xbuild", "/p:Configuration=Release", "./FChan.sln"
system "cd", "./FChan.Downloader/bin/Release/"
system "mkbundle", "-o", "fchand", "FChan.Downloader.exe", "Newtonsoft.Json.dll", "FChan.Library.dll", "--deps"

test do
system "false"

But every time I do
brew install fchan
I get an error:

==> Downloading
Already downloaded: /Library/Caches/Homebrew/fchan-0.1.2.tar.gz
==> Verifying fchan-0.1.2.tar.gz checksum
tar xf /Library/Caches/Homebrew/fchan-0.1.2.tar.gz
==> xbuild /p:Configuration=Release ./FChan.sln
Failed to execute: xbuild

Can anyone explain to me how to create a proper homebrew formula for mono applications?


Since your formula depends on Mono, you need to define the formula dependency as such:

depends_on "mono"