require 'formula' class Ser2net < Formula homepage 'http://ser2net.sourceforge.net' url 'http://downloads.sourceforge.net/project/ser2net/ser2net/2.7/ser2net-2.7.tar.gz' sha1 'ebceb41479ce5e33f400b1564d420dc12b6b44f6' def install ENV.deparallelize # Fix etc location inreplace ["ser2net.c", "ser2net.8"], "/etc/ser2net.conf", "#{etc}/ser2net.conf" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}" system "make install" etc.install 'ser2net.conf' end def caveats; <<-EOS.undent To configure ser2net, edit the example configuration in #{etc}/ser2net.conf EOS end plist_options :manual => 'ser2net -p 12345' def plist; <<-EOS.undent Label #{plist_name} RunAtLoad KeepAlive UserName #{`whoami`.chomp} ProgramArguments #{opt_prefix}/sbin/ser2net -p 12345 WorkingDirectory #{HOMEBREW_PREFIX} EOS end end