2013-03-17 08:11:14 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class AptCacherNg < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Caching proxy"
|
2013-03-17 08:11:14 +00:00
|
|
|
homepage 'http://www.unix-ag.uni-kl.de/~bloch/acng/'
|
2014-08-29 16:01:07 +00:00
|
|
|
url "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_0.7.27.orig.tar.xz"
|
|
|
|
sha1 "ae1324bf3c42909546f2b9d2a25cd9d837977a42"
|
2013-03-17 08:11:14 +00:00
|
|
|
|
2014-06-29 03:47:43 +00:00
|
|
|
bottle do
|
2014-08-29 16:11:19 +00:00
|
|
|
sha1 "10658beb0ba8bb53e2c99a40a79833d04c8215df" => :mavericks
|
|
|
|
sha1 "88b90f06af2229837cf3086f035e02316719e679" => :mountain_lion
|
|
|
|
sha1 "351cd708e659a1ec9959044568e71c2278a9debd" => :lion
|
2014-06-29 03:47:43 +00:00
|
|
|
end
|
|
|
|
|
2013-03-17 08:11:14 +00:00
|
|
|
depends_on 'cmake' => :build
|
2014-09-10 05:35:52 +00:00
|
|
|
depends_on :osxfuse => :build
|
2013-11-10 07:11:44 +00:00
|
|
|
depends_on 'boost' => :build
|
|
|
|
|
2013-03-17 08:11:14 +00:00
|
|
|
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
|
2013-11-10 07:11:44 +00:00
|
|
|
(var/'log').mkpath
|
2013-03-17 08:11:14 +00:00
|
|
|
|
|
|
|
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>
|
2014-03-06 05:28:31 +00:00
|
|
|
<string>#{opt_sbin}/apt-cacher-ng</string>
|
2013-03-17 08:11:14 +00:00
|
|
|
<string>-c</string>
|
|
|
|
<string>#{etc}/apt-cacher-ng</string>
|
|
|
|
<string>foreground=1</string>
|
|
|
|
</array>
|
|
|
|
<key>ServiceIPC</key>
|
|
|
|
<false/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
2013-11-10 07:11:44 +00:00
|
|
|
|
2013-03-17 08:11:14 +00:00
|
|
|
end
|