diff options
| author | Andrew Sharpe | 2013-03-17 18:11:14 +1000 |
|---|---|---|
| committer | Adam Vandenberg | 2013-06-04 15:27:29 -0700 |
| commit | 1179e94fb8a3eeca1430edbd5857f9b8a34e5a65 (patch) | |
| tree | e4fc24068effbfc2578d5e742fed516ad2de29d3 /Library/Formula | |
| parent | 072e8f903c1c83c62092470d3b313f2245dabcef (diff) | |
| download | homebrew-1179e94fb8a3eeca1430edbd5857f9b8a34e5a65.tar.bz2 | |
apt-cacher-ng 0.7.13
Closes #18533.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/apt-cacher-ng.rb | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Library/Formula/apt-cacher-ng.rb b/Library/Formula/apt-cacher-ng.rb new file mode 100644 index 000000000..a8ecf9077 --- /dev/null +++ b/Library/Formula/apt-cacher-ng.rb @@ -0,0 +1,56 @@ +require 'formula' + +class AptCacherNg < Formula + homepage 'http://www.unix-ag.uni-kl.de/~bloch/acng/' + url 'http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_0.7.13.orig.tar.xz' + sha1 'bb6c3cf8e116ed9800543b7864a3a7b406aa4d5a' + + depends_on 'xz' => :build + depends_on 'cmake' => :build + depends_on 'fuse4x' => :build + + def install + system 'make apt-cacher-ng' + + inreplace 'conf/acng.conf' do |s| + s.gsub! /^CacheDir: .*/, "CacheDir: #{var}/spool/apt-cacher-ng" + s.gsub! /^LogDir: .*/, "LogDir: #{var}/log" + end + + # copy default config over + etc.install 'conf' => 'apt-cacher-ng' + + # create the cache directory + (var/'spool/apt-cacher-ng').mkpath + + sbin.install 'build/apt-cacher-ng' + man8.install 'doc/man/apt-cacher-ng.8' + end + + plist_options :startup => true + + def 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>Label</key> + <string>#{plist_name}</string> + <key>OnDemand</key> + <false/> + <key>RunAtLoad</key> + <true/> + <key>ProgramArguments</key> + <array> + <string>#{opt_prefix}/sbin/apt-cacher-ng</string> + <string>-c</string> + <string>#{etc}/apt-cacher-ng</string> + <string>foreground=1</string> + </array> + <key>ServiceIPC</key> + <false/> + </dict> + </plist> + EOS + end +end |
