require 'formula' class Olsrd < Formula homepage 'http://www.olsr.org' url 'http://www.olsr.org/releases/0.6/olsrd-0.6.5.1.tar.bz2' sha1 '1cd7afe9051126672b2b361975855a4304d651f9' def install lib.mkpath args = %W[ DESTDIR=#{prefix} USRDIR=#{prefix} LIBDIR=#{lib} ] system 'make', 'build_all', *args system 'make', 'install_all', *args end plist_options :startup => true, :manual => "olsrd -f #{HOMEBREW_PREFIX}/etc/olsrd.conf" def startup_plist; <<-EOS.undent Label #{plist_name} ProgramArguments #{HOMEBREW_PREFIX}/sbin/olsrd -f #{etc}/olsrd.conf KeepAlive NetworkState EOS end end