diff options
| author | Robert Shaw | 2010-03-11 17:18:00 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-05-12 09:42:25 -0700 |
| commit | 184624e85ec470ec1320fb9aac2b7663d4cec082 (patch) | |
| tree | fd4fad403a9d9deea6555b6d369d955c84a159db /Library/Formula | |
| parent | 3a7a3619f7016c75c3e53e944221bf7f6354a63b (diff) | |
| download | homebrew-184624e85ec470ec1320fb9aac2b7663d4cec082.tar.bz2 | |
New formula: platypus
Formula for Platypus version 4.2.
Note: This builds only the command-line utility, not the application
bundle, as homebrew is not supposed to build apps.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/platypus.rb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Library/Formula/platypus.rb b/Library/Formula/platypus.rb new file mode 100644 index 000000000..a4b0961ae --- /dev/null +++ b/Library/Formula/platypus.rb @@ -0,0 +1,47 @@ +require 'formula' + +class Platypus <Formula + url 'http://www.sveinbjorn.org/files/software/platypus.src.zip' + version '4.2' + homepage 'http://www.sveinbjorn.org/platypus' + md5 '238f3c28b30a35ee86961c31f2ff5cff' + + def install + # Fix paths + inreplace "CommonDefs.h" do |s| + s.gsub! "/usr/local", prefix + end + + # Build main command-line binary, we don't care about the App + Dir.chdir('command_line_tool') do + # Fix paths + inreplace ["platypus.m", "platypus.1"] do |s| + s.gsub! "/usr/local", prefix + end + + # Build binary + system "xcodebuild", "-target", "platypus", "-configuration", "Deployment", "ONLY_ACTIVE_ARCH=YES" + end + # Build application sub-binary needed by command-line utility + Dir.chdir('Script_Exec') do + system "xcodebuild", "-target", "ScriptExec", "-configuration", "Release", "ONLY_ACTIVE_ARCH=YES" + end + + # Install binary and man page + Dir.chdir('command_line_tool') do + bin.install "build/Deployment/platypus" + man1.install "platypus.1" + end + # Install sub-binary parts to share + Dir.chdir('Script_Exec/build/Release/ScriptExec.app/Contents') do + (share + 'platypus').install "MacOS/ScriptExec" + (share + 'platypus' + 'MainMenu.nib').install "Resources/English.lproj/MainMenu.nib/keyedobjects.nib" + end + + # Install icons to share + (share + 'platypus').install 'Icons/PlatypusDefault.icns' + + # Write version info to share + (share + 'platypus' + 'Version').write version + end +end |
