homebrew-core/Formula/staticrouted.rb
Charlie Sharpsteen 1a42f893ab XCodeDependency: Things that call xcodebuild
Anything that calls `xcodebuild` needs a full install of XCode.app. Two
formulae ommitted from this patch:

  - `fuse4x_kext`: Everything that depends on the kernel extension can be
    compiled by the CLT. Therefore, this formula is bottled and XCode is only
    needed to produce the bottles.

  - `graphviz`: XCode is only used to create GraphViz.app which is not used by
    any of the things which depend on `graphviz`. Creating the app should be
    made into an option.
2012-08-24 19:38:04 -07:00

34 lines
1.4 KiB
Ruby

require 'formula'
class Staticrouted < Formula
url 'http://alastairs-place.net/stuff/staticrouted.tar.bz2'
homepage 'http://lists.apple.com/archives/macos-x-server/2010/Jul/msg00220.html'
version '1.0.1'
md5 '1f76b4f15d3bc332d40732bde154a20e'
depends_on :xcode # For working xcodebuild.
def install
system "xcodebuild SYMROOT=build -target Everything"
sbin.install ["build/Release/staticroute", "build/Release/staticrouted"]
man8.install ["staticroute.8", "staticrouted.8"]
prefix.install "com.coriolis-systems.staticrouted.plist"
(prefix+"com.coriolis-systems.staticrouted.plist").chmod 0644
end
def caveats; <<-EOS.undent
If this is your first install, automatically load on login with:
sudo mkdir -p /Library/LaunchDaemons
sudo cp #{prefix}/com.coriolis-systems.staticrouted.plist /Library/LaunchDaemons/
sudo launchctl load -w /Library/LaunchDaemons/com.coriolis-systems.staticrouted.plist
If this is an upgrade and you already have the com.coriolis-systems.staticrouted.plist loaded:
sudo launchctl unload -w /Library/LaunchDaemons/com.coriolis-systems.staticrouted.plist
sudo cp #{prefix}/com.coriolis-systems.staticrouted.plist /Library/LaunchDaemons/
sudo launchctl load -w /Library/LaunchDaemons/com.coriolis-systems.staticrouted.plist
Or start it manually:
sudo staticrouted
EOS
end
end