Created /Library moved brew tool to /bin

Moved Forumla and Cellar/homebrew into Library.

This way the homebrew core files are more sensibly placed, Cellar is
more internally consistent and only generated. And Homebrew is ready for
use straight out of the tarball.
This commit is contained in:
Max Howell committed 2009-06-04 19:36:58 +01:00
1 parent 84ad47bc3c
commit e91aeafc82
26 files changed
+81 -64

No files matched your search

+2 -4
View File
@@ -1,6 +1,4 @@
.DS_Store
/*/
!/Cellar/
!/Formula/
/Cellar/*/
!/Cellar/homebrew/
!/Library/
!/bin/brew
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3 -3
View File
@@ -11,10 +11,10 @@ class Git <Formula
@homepage='http://git-scm.com'
def install
system "./configure --prefix='#{prefix}' --disable-debug"
system "make install"
# the manuals come separately, well sort of, it's easier this way though
GitManuals.new.brew { FileUtils.mv Dir['*'], man }
system "./configure --prefix='#{prefix}' --disable-debug"
system "make install"
end
end
+1 -1
View File
@@ -63,7 +63,7 @@ class Grc <Formula
grc won't work as is. One option is to add some aliases to your ~/.profile
file. Homebrew can do that for you, just execute this command:
ruby #{$0} --profile >> ~/.profile
brew grc --profile >> ~/.profile
EOS
end
File renamed without changes.
@@ -2,8 +2,8 @@ require 'brewkit'
class Liblastfm <Formula
@homepage='http://github.com/mxcl/liblastfm/'
@url='http://github.com/mxcl/liblastfm/tarball/0.3.0'
@md5='08e90275ccd06476426a5002d1dad762'
@url='http://static.last.fm/src/liblastfm-0.3.0.tar.bz2'
@md5='3f73222ebc31635941832b01e7a494b6'
def deps
dep_test_bin 'qmake' or 'qt'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,23 @@
# Copyright 2009 Max Howell <max@methylblue.com>
# Licensed as per the GPL version 3
# Copyright 2009 Max Howell <max@methylblue.com>
#
# This file is part of Homebrew.
#
# Homebrew is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Homebrew is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Homebrew. If not, see <http://www.gnu.org/licenses/>.
require 'pathname'
require 'osx/cocoa' # to get number of cores
require "#{File.dirname __FILE__}/env"
HOMEBREW_VERSION='0.1'
@@ -181,36 +197,28 @@ public
FileUtils.rm_rf tmp if tmp
FileUtils.rm tgz if tgz and not self.cache?
end
ohai 'Finishing up'
begin
prefix
rescue RuntimeError
# you can have packages that aren't for installing, see git
# this is a HACK though, and dirty, and not right
return
end
prefix.find do |path|
if path==prefix #rubysucks
next
elsif path.file?
if path.extname == '.la'
path.unlink
else
fo=`file -h #{path}`
args=nil
args='-SxX' if fo =~ /Mach-O dynamically linked shared library/
args='' if fo =~ /Mach-O executable/ #defaults strip everything
if args
puts "Stripping: #{path}" if ARGV.include? '--verbose'
`strip #{args} #{path}`
end
end
end
def clean
prefix.find do |path|
if path==prefix #rubysucks
next
elsif path.file?
if path.extname == '.la'
path.unlink
else
fo=`file -h #{path}`
args=nil
args='-SxX' if fo =~ /Mach-O dynamically linked shared library/
args='' if fo =~ /Mach-O executable/ #defaults strip everything
if args
puts "Stripping: #{path}" if ARGV.include? '--verbose'
`strip #{args} #{path}`
end
elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib'
Find.prune
end
elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib'
Find.prune
end
end
end
+22
View File
@@ -0,0 +1,22 @@
# Copyright 2009 Max Howell <max@methylblue.com>
#
# This file is part of Homebrew.
#
# Homebrew is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Homebrew is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Homebrew. If not, see <http://www.gnu.org/licenses/>.
require 'pathname'
$root=Pathname.new(__FILE__).dirname.parent.parent.realpath
$formula=$root+'Library'+'Formula'
$cellar=$root+'Cellar'
@@ -1,11 +1,6 @@
#!/usr/bin/ruby
$:.unshift File.dirname(__FILE__)
require 'pathname'
$root=Pathname.new(__FILE__).realpath.dirname.parent.parent
$cellar=$root+'Cellar'
require 'brewkit'
require 'test/unit'
require "#{__FILE__}/../brewkit"
class TestFormula <Formula
def initialize url, md5
+12 -18
View File
@@ -1,12 +1,9 @@
#!/usr/bin/ruby
# Copyright 2009 Max Howell <max@methylblue.com>
# Licensed as per the GPL version 3
require 'find'
require 'pathname'
$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew"
$root=Pathname.new(__FILE__).realpath.dirname.parent.parent
$formula=$root+'Formula'
$cellar=$root+'Cellar'
$:.unshift Pathname.new(__FILE__).dirname.parent.realpath+'Library'+'Homebrew'
require 'env'
def prune
n=0
@@ -14,7 +11,7 @@ def prune
$root.find do |path|
if path.directory?
name=path.relative_path_from($root).to_s
if name == '.git' or name == 'Cellar' or name == 'Formula'
if name == '.git' or name == 'Cellar' or name == 'Library/Homebrew' or name == 'Library/Formula'
Find.prune
else
dirs<<path
@@ -90,10 +87,10 @@ def ln name
raise '#{keg} is not a keg'
end
#TODO consider using hardlinks
# yeah indeed, you have to force anything you want in the main tree into
# these directories :P
# yeah indeed, you have to force anything you need in the main tree into
# these directories :P
# NOTE that not everything needs to be in the main tree
# TODO consider using hardlinks
$n=0
lnd(keg, 'etc') {nil}
lnd(keg, 'include') {nil}
@@ -113,13 +110,8 @@ def ln name
end
lnd(keg, 'share') do |path|
path=path.to_s
if ['man','doc','locale','info'].include? path
:mkpath
else
mans=(1..9).collect {|x| "man/man#{x}"}
:mkpath if mans.include? path
end
includes=(1..9).collect {|x| "man/man#{x}"} <<'man'<<'doc'<<'locale'<<'info'
:mkpath if includes.include? path.to_s
end
return $n
@@ -219,6 +211,8 @@ begin
o=__obj(name)
raise "#{o.prefix} already exists!" if o.prefix.exist?
o.brew { o.install }
ohai 'Finishing up'
o.clean
ln name
puts "#{o.prefix}: "+`find #{o.prefix} -type f | wc -l`.strip+
' files, '+