2010-07-06 10:05:40 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pincaster < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/jedisct1/Pincaster'
|
2012-10-16 08:42:59 +00:00
|
|
|
url 'http://download.pureftpd.org/pincaster/releases/pincaster-0.6.tar.bz2'
|
|
|
|
sha1 'ad3799ce3207480979355f30d6f534dad6229ae2'
|
2010-07-06 10:05:40 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
|
|
|
|
inreplace "pincaster.conf" do |s|
|
|
|
|
s.gsub! "/var/db/pincaster/pincaster.db", "#{var}/db/pincaster/pincaster.db"
|
|
|
|
s.gsub! "# LogFileName /tmp/pincaster.log", "LogFileName #{var}/log/pincaster.log"
|
|
|
|
end
|
|
|
|
|
|
|
|
etc.install "pincaster.conf"
|
|
|
|
(var+"db/pincaster/").mkpath
|
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "pincaster #{HOMEBREW_PREFIX}/etc/pincaster.conf"
|
2010-07-06 10:05:40 +00:00
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
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>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
2014-03-06 05:28:31 +00:00
|
|
|
<string>#{opt_bin}/pincaster</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
<string>#{etc}/pincaster.conf</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{var}</string>
|
|
|
|
<key>StandardErrorPath</key>
|
|
|
|
<string>#{var}/log/pincaster.log</string>
|
|
|
|
<key>StandardOutPath</key>
|
|
|
|
<string>#{var}/log/pincaster.log</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2010-07-06 10:05:40 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|