This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/mxcl/homebrew
- Loading branch information
Showing
13 changed files
with
215 additions
and
61 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
require 'formula' | ||
|
||
class Box2d < Formula | ||
url 'http://box2d.googlecode.com/files/Box2D_v2.1.2.zip' | ||
url 'http://box2d.googlecode.com/files/Box2D_v2.2.1.zip' | ||
homepage 'http://www.box2d.org/' | ||
md5 '59d142cd8d4d73e8832c7b67591f590c' | ||
sha1 'f97e75227a19b01858b1431e5f3eb6b8827bed12' | ||
|
||
depends_on 'cmake' | ||
depends_on 'cmake' => :build | ||
|
||
def install | ||
system "cmake Box2D/ -DBOX2D_BUILD_SHARED=ON -DBOX2D_INSTALL_DOC=ON -DBOX2D_BUILD_EXAMPLES=OFF #{std_cmake_parameters}" | ||
system "make -C Box2D/ install" | ||
# docs say build oos | ||
Dir.chdir 'Build' do | ||
system "cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON #{std_cmake_parameters} .." | ||
system "make install" | ||
end | ||
end | ||
end |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,17 @@ | ||
require 'formula' | ||
|
||
class Calcurse < Formula | ||
url 'http://culot.org/cgi-bin/get.cgi?calcurse-2.7.tar.gz' | ||
homepage 'http://culot.org/calcurse/' | ||
md5 'eddfae36370fd89532149fe80c312e1e' | ||
url 'http://calcurse.org/files/calcurse-2.9.2.tar.gz' | ||
homepage 'http://calcurse.org/' | ||
md5 '5cb7d9c9edddc551fc62c9c5733591c5' | ||
|
||
depends_on 'gettext' | ||
|
||
def patches | ||
DATA | ||
end | ||
|
||
def install | ||
ENV.append 'CFLAGS', "-I#{include} -fnested-functions" | ||
ENV.append 'LDFLAGS', "-lintl" | ||
ENV.O3 | ||
system "./configure", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--mandir=#{man}" | ||
# need this flag otherwise there is a build error. | ||
ENV.append 'CFLAGS', "-fnested-functions" | ||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" | ||
system "make" | ||
system "make install" | ||
end | ||
|
||
end | ||
__END__ | ||
diff --git a/configure b/configure | ||
index 69d2800..175871e 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -1488,7 +1488,8 @@ else | ||
if test -f "$ac_aux_dir/mkinstalldirs"; then | ||
mkdir_p='$(mkinstalldirs)' | ||
else | ||
- mkdir_p='$(SHELL) $(install_sh) -d' | ||
+ #mkdir_p='$(SHELL) $(install_sh) -d' | ||
+ mkdir_p='$(install_sh) -d' | ||
fi | ||
fi | ||
|
||
@@ -1706,7 +1707,8 @@ else | ||
fi | ||
|
||
fi | ||
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | ||
+#INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | ||
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | ||
|
||
# We need awk for the "check" target. The system "awk" is bad on | ||
# some platforms. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'formula' | ||
|
||
class Libmxml < Formula | ||
url 'http://ftp.easysw.com/pub/mxml/2.6/mxml-2.6.tar.gz' | ||
homepage 'http://www.minixml.org/' | ||
md5 '68977789ae64985dddbd1a1a1652642e' | ||
|
||
def install | ||
system "./configure", "--disable-debug", | ||
"--disable-dependency-tracking", | ||
"--enable-shared", | ||
"--prefix=#{prefix}" | ||
system "make" | ||
system "make install" | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'formula' | ||
|
||
class NagiosPlugins < Formula | ||
url 'http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz' | ||
homepage 'http://nagiosplugins.org/' | ||
md5 '56abd6ade8aa860b38c4ca4a6ac5ab0d' | ||
|
||
def nagios_sbin; sbin+'nagios-plugins'; end | ||
|
||
def install | ||
system "./configure", "--disable-debug", | ||
"--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--libexecdir=#{nagios_sbin}" | ||
system "make install" | ||
end | ||
|
||
def caveats | ||
<<-EOS.undent | ||
All plugins are accessible under | ||
#{nagios_sbin} | ||
and get symlinked to | ||
#{HOMEBREW_PREFIX}/sbin/nagios-plugins | ||
so that they don't appear in your search path but still can be found by | ||
nagios across version updates. | ||
Please feel free to update your PATH if you want to use them standalone! | ||
EOS | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
require 'formula' | ||
|
||
class Nagios < Formula | ||
url 'http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz' | ||
homepage 'http://www.nagios.org/' | ||
md5 'fe1be46e6976a52acdb021a782b5d04b' | ||
|
||
depends_on 'gd' | ||
depends_on 'nagios-plugins' | ||
|
||
def nagios_sbin; prefix+'cgi-bin'; end | ||
def nagios_etc; etc+'nagios'; end | ||
def nagios_var; var+'lib/nagios'; end | ||
def htdocs; share+'nagios/htdocs'; end | ||
def user; `id -un`.chomp; end | ||
def group; `id -gn`.chomp; end | ||
|
||
def install | ||
ENV.x11 # Required to compile some CGI's against the build-in libpng. | ||
system "./configure", "--disable-debug", | ||
"--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--sbindir=#{nagios_sbin}", | ||
"--sysconfdir=#{nagios_etc}", | ||
"--localstatedir=#{nagios_var}", | ||
"--datadir=#{htdocs}", | ||
"--with-cgiurl=/nagios/cgi-bin", | ||
"--with-htmurl=/nagios", | ||
"--with-nagios-user=#{user}", | ||
"--with-nagios-group=#{group}", | ||
"--with-command-user=#{user}", | ||
"--with-command-group=_www", | ||
"--with-httpd-conf=#{share}" | ||
system "make all" | ||
system "make install" | ||
|
||
# Install config | ||
system "make install-config" | ||
system "make install-webconf" | ||
(share+'org.nagios.plist').write startup_plist | ||
|
||
# Symlink plugins | ||
libexec.rmdir | ||
ln_s HOMEBREW_PREFIX+'sbin/nagios-plugins', libexec | ||
end | ||
|
||
def startup_plist | ||
<<-EOS.undent | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>KeepAlive</key> | ||
<true/> | ||
<key>Label</key> | ||
<string>org.nagios</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>#{HOMEBREW_PREFIX}/bin/nagios</string> | ||
<string>#{nagios_etc}/nagios.cfg</string> | ||
</array> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>StandardErrorPath</key> | ||
<string>/dev/null</string> | ||
<key>StandardOutPath</key> | ||
<string>/dev/null</string> | ||
<key>UserName</key> | ||
<string>#{user}</string> | ||
</dict> | ||
</plist> | ||
EOS | ||
end | ||
|
||
def caveats | ||
<<-EOS.undent | ||
First we need to create a command dir using superhuman powers: | ||
mkdir -p #{nagios_var}/rw | ||
sudo chgrp _www #{nagios_var}/rw | ||
sudo chmod 2775 #{nagios_var}/rw | ||
Then install the Nagios web frontend into Apple's build-in Apache: | ||
1) Turn on Personal Web Sharing. | ||
2) Load the php module by patching /etc/apache2/httpd.conf: | ||
-#LoadModule php5_module libexec/apache2/libphp5.so | ||
+LoadModule php5_module libexec/apache2/libphp5.so | ||
3) Symlink the sample config and create your web account: | ||
sudo ln -sf #{share}/nagios.conf /etc/apache2/other/ | ||
htpasswd -cs #{nagios_etc}/htpasswd.users nagiosadmin | ||
sudo apachectl restart | ||
If you want to run nagios automatically at startup: | ||
sudo cp #{share}/org.nagios.plist /Library/LaunchDaemons/ | ||
sudo launchctl load -w /Library/LaunchDaemons/org.nagios.plist | ||
...or simply run it on demand: | ||
nagios #{nagios_etc}/nagios.cfg | ||
Now log in with your web account (and don't forget to RTFM :-) | ||
open http://localhost/nagios | ||
EOS | ||
end | ||
end |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'formula' | ||
|
||
class Utimer < Formula | ||
url 'http://utimer.codealpha.net/dl.php?file=utimer-0.4.tar.gz' | ||
homepage 'http://utimer.codealpha.net/utimer/' | ||
md5 '5fc82bcea449bdc3527a6833a1196641' | ||
|
||
depends_on 'pkg-config' => :build | ||
depends_on 'glib' | ||
depends_on 'intltool' | ||
depends_on 'gettext' | ||
depends_on 'XML::Parser' => :perl | ||
|
||
def install | ||
system "./configure", "--disable-debug", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}" | ||
system "make install" | ||
end | ||
end |