2012-11-27 22:45:33 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Unar < Formula
|
|
|
|
homepage 'http://unarchiver.c3.cx/commandline'
|
2013-07-14 12:44:04 +00:00
|
|
|
url 'http://theunarchiver.googlecode.com/files/unar1.7_src.zip'
|
|
|
|
version '1.7'
|
|
|
|
sha1 'e34760d3806fbf3f1358485ccadf51bd5c7f81be'
|
2012-11-27 22:45:33 +00:00
|
|
|
|
|
|
|
head 'https://code.google.com/p/theunarchiver/' , :using => :hg
|
|
|
|
|
|
|
|
depends_on :xcode
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Tarball has extra folder over hg checkout
|
|
|
|
cd "./The Unarchiver" unless build.head?
|
|
|
|
|
|
|
|
# Build XADMaster.framework, unar and lsar
|
|
|
|
system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target XADMaster SYMROOT=../ -configuration Release"
|
|
|
|
system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target unar SYMROOT=../ -configuration Release"
|
|
|
|
system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target lsar SYMROOT=../ -configuration Release"
|
|
|
|
|
|
|
|
bin.install "./Release/unar", "./Release/lsar"
|
|
|
|
|
2013-05-03 16:21:08 +00:00
|
|
|
lib.install "./Release/libXADMaster.a"
|
2013-05-03 16:28:45 +00:00
|
|
|
frameworks.install "./Release/XADMaster.framework"
|
|
|
|
(include/'libXADMaster').install_symlink Dir["#{frameworks}/XADMaster.framework/Headers/*"]
|
2012-11-27 22:45:33 +00:00
|
|
|
|
|
|
|
cd "./Extra" do
|
|
|
|
man1.install "lsar.1", "unar.1"
|
|
|
|
bash_completion.install "unar.bash_completion", "lsar.bash_completion"
|
|
|
|
end
|
|
|
|
end
|
2013-07-14 12:44:04 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
system bin/'unar', '--version'
|
|
|
|
system bin/'lsar', '--version'
|
|
|
|
end
|
2012-11-27 22:45:33 +00:00
|
|
|
end
|