Re: Update Hombrew install instructions on the web site
Anders F Björklund <[email protected]>
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <[email protected]> |
Thomas Leonard wrote:
>> I have updated the home page now: http://0install.net/install-osx.html
>> Removed the references to the rejected formula and any future bottle.
>
> Looks like the recent sf.net storage issue lost these changes from the
> live site. The shell just came back, so I've pushed your updates
> again.
Thank you!
Haven't received _any_ feedback on it, so I'm assuming it's alright.
Then again I thought the previous version was pretty decent already :-)
>> Also modernized a bit, and added a "short version" for the impatient...
>> (it is also quite faster, since using /usr/local enables prebuilt binaries)
Apparently, to get 0install included as a bottle in homebrew
we need to also include all the OPAM dependencies explicitly:
(wonder if you can get opam to do this, with a small helper ?
i.e. output all the URLs and SHAs, for the required +opam.tar.gz)
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#specifying-gems-python-modules-go-projects-etc-as-dependencies
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/opam.rb
This means that we cannot just depend on the top OPAM modules,
but need to resolve and provide every dependency explicitly. :-(
Homebrew also doesn't handle dependencies and options very well,
so we should make the GUI default (in order to ever get it built)
And it seems like our Makefile doesn't support using a #{prefix} ?
I just replaced the local section under /usr/local to make it work.
And it crashed if doing "make install" without doing a "make" first...
But other than these issues, the 0install formula seems to be working:
https://github.com/afb/homebrew/blob/0install/Library/Formula/zero-install.rb
def install
system "make"
inreplace 'dist/install.sh', '"/usr/local"', prefix
inreplace 'dist/install.sh', '"${PREFIX}/man"', man
system "make", "install"
end
Preferably this should be just `make install` with some ./configure ?
The split installation between prefix and HOMEBREW_PREFIX is an issue.
We would want Zero Install to go into Cellar/0install/2.8, but it should
use the "regular" directories (well, global anyway) for #{etc} and #{var}.
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#variables-for-directory-locations
Then bin, man and lib are then symlinked from the Cellar into the prefix.
Many software installations are confused by the concept of two prefixes...
--anders
PS.
If you want to, you can also play with the formula using Linuxbrew:
(maybe not so much for installing, but to help with OS X packaging)
http://brew.sh/linuxbrew/
At least this is easier than building OCaml/OPAM/GnuPG/GTK+ myself.
Only downside is that it doesn't support older releases (like 10.6).
------------------------------------------------------------------------------