20 Commits

Author SHA1 Message Date
Max Howell
c28bd7b571 Allow formulae to use __END__
For this to work the "running script" must be the formulae file. Making this
so wasn't so hard, there is now an install.rb script which is included with
the -r flag to the ruby executable. An at_exit handler calls the install
function.

Having the install logic in its own file made it feel like there was so much
space that I added extra error handling. So there is something to be said for
separating functionality out into its own files.

Still the error handling sucks, we'll need to marshall the exception back to
the bin/brew command. Which is another PITA.

Still overall I think this will prove worthwhile. But if it doesn't we'll
revert.

As a first usage, you can put a diff after __END__ and return DATA from
Formula::patches to make Homebrew aware of it.
2009-09-16 14:49:06 +01:00
Max Howell
f0f59659dd Overriding Object.class was not my intention
Renamed to Formula::class_s.
2009-09-11 17:42:53 +01:00
Max Howell
18d9fbee98 Closes Homebrew/homebrew#27 (permissions to strict)
I went with 0555 as the permissions changing only occurs to bin, sbin and lib, so there shouldn't be any files in there for editing in general anyway.

Formulae can specify not to "clean" any particular file by reimplementing the skip_clean? function, in case some config file or what not ends up in there.

Also committing cosmetic fix to pretty_duration function.
2009-09-03 20:58:33 +01:00
Max Howell
4c09e3ef2b brew info FIX if git isn't installed 2009-09-02 15:44:10 +01:00
Max Howell
4f8c46d627 Only time the build, not the download too 2009-09-02 15:44:10 +01:00
Max Howell
2ff0294e18 Foolish lack of backslash causes brew mk b0rkage 2009-08-31 22:05:42 +01:00
Max Howell
1e22bb4ee1 Use github.user for github history link
Discussion: d60fc4ba86d45255b0093303c45f6b1c2196fda2
2009-08-31 21:20:09 +01:00
Max Howell
5dd3708768 Use newer configure syntax as make template 2009-08-31 18:29:43 +01:00
Max Howell
84d034f9fb docs is an alias for doc sometimes apparently
We don't install documentation to save space. It seems pointless in this
modern age where the online docs are probably more up to date. However I do
believe this should be an option, defaulting to "don't install".
2009-08-31 18:23:41 +01:00
Christian Mayer
2a72c2fa0e If forked, open Github history of forked repository 2009-08-31 18:09:48 +01:00
Max Howell
4d63b87e0a Change license to BSD
I confirmed this change with all relevant contributors first.
2009-08-31 16:09:17 +01:00
Max Howell
c53e10f4aa FIX brew diy --set-version --set-name 2009-08-24 01:04:53 +01:00
Adeel Ahmad Khan
1c55642645 Link binaries in sbin as well as bin.
Signed-off-by: Max Howell <max@methylblue.com>
2009-08-12 23:55:57 +08:00
Max Howell
140bfc5592 brew diy command
Automagically determines prefix to install to for DIY installations.

README amended.
2009-08-12 13:43:51 +01:00
Max Howell
6661f78618 Allow skip_clean? to skip entire directories
Speeds up Python formula plenty in clean phase
2009-08-10 18:12:16 +01:00
Max Howell
0ea078e1ae Install README.txt etc. as README 2009-08-10 18:11:23 +01:00
Max Howell
f724f5ed52 Ensure ENV is pristine for each installation
Because we modified the ENV global each install this propagated to consecutive
formulae. So exec a new brew process each install. This is the safest way
although Ruby exceptions don't propagate to the parent process so I worry
about it somewhat.
2009-08-10 18:11:23 +01:00
Max Howell
a6577e5117 When safe, correct common install issues
Eg. man can be moved into share without consequences
2009-08-10 18:11:23 +01:00
Max Howell
a84bf77515 Delete installed documentation after install
Documentation is all online nowadays, and is more current there.

Documentation often takes up more space than the rest of the package.

Package listings are now more relevent.

We'll make it optional as soon as one person complains.
2009-08-10 18:11:23 +01:00
Max Howell
760c083c0c Refactor
Large refactor to Formula, mostly improving reliability and error handling but
also layout and readability.

General improvements so testing can be more complete.

Patches are automatically downloaded and applied for Formula that return a
list of urls from Formula::patches.

Split out the brew command logic to facilitate testing.

Facility from Adam Vandenberg to allow selective cleaning of files, added
because Python doesn't work when stripped.
2009-08-10 18:11:17 +01:00