-
-
Save afb/18594d0b939a71a675f6 to your computer and use it in GitHub Desktop.
homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class ZeroInstall < Formula | |
homepage 'http://0install.net/injector.html' | |
url 'https://downloads.sf.net/project/zero-install/0install/2.6.2/0install-2.6.2.tar.bz2' | |
sha256 '5755226ef4b32f04723bcbe551f4694ddf78dffbb0f589c3140c2d7056370961' | |
head 'https://github.com/0install/0install' | |
option 'without-gui', "Build without the gui (requires GTK+)" | |
depends_on 'gnupg' | |
depends_on 'glib' if build.without? 'gui' | |
depends_on 'gtk+' if build.with? 'gui' | |
depends_on 'gettext' => :build if build.head? | |
depends_on 'objective-caml' => :build | |
depends_on 'opam' => :build | |
def install | |
modules = "yojson xmlm ounit react lwt extlib ssl ocurl" | |
modules += " lablgtk" if build.with? 'gui' | |
# TODO: Use $OPAMCURL to store a cache outside the build directory | |
ENV['OPAMCURL'] = "curl" | |
ENV['OPAMROOT'] = "opamroot" | |
system "opam init --no-setup" | |
ENV['OPAMYES'] = "1" | |
system "eval \`opam config env\`; opam install #{modules}" | |
system "make" | |
system "cd dist && ./install.sh #{prefix}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've made some build fixes (notably deparallelise, lablgtk2 build fixes, and use opam config exec to run make) in my fork: https://gist.github.com/avsm/39d0ced39f9ed45165d5
Are you planning to submit this upstream to Homebrew?