Skip to content

Instantly share code, notes, and snippets.

@lenada
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenada/e773a65aa9d37c0eb42c to your computer and use it in GitHub Desktop.
Save lenada/e773a65aa9d37c0eb42c to your computer and use it in GitHub Desktop.
Formula/znapzend
class Znapzend < Formula
homepage "http://www.znapzend.org/"
url "https://github.com/oetiker/znapzend/releases/download/v0.14.0/znapzend-prebuilt-0.14.0.tar.gz"
version "0.14.0"
sha1 "a83ff783f2e01a663f3487eb91ace4a80807e279"
def install
bin.install Dir['bin/*']
lib.install Dir['lib/*']
share.install Dir['share/*']
libexec.install %w{ thirdparty }
inreplace Dir["#{bin}/*"], "$FindBin::Bin/../lib", lib
inreplace Dir["#{bin}/*"], "$FindBin::Bin/../thirdparty", libexec/'thirdparty'
bin.install_symlink Dir['bin/*']
end
plist_options :manual => "znapzend"
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>
<string>#{bin}/znapzend</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment