2011-09-11 11:53:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class ApktoolExecutables < Formula
|
2013-01-02 01:22:34 +00:00
|
|
|
url 'https://android-apktool.googlecode.com/files/apktool-install-macosx-r05-ibot.tar.bz2'
|
|
|
|
sha1 'c2fb262760ccd27530e58ccc4bbef4d4a7b0ab39'
|
2011-09-11 11:53:57 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Apktool < Formula
|
|
|
|
homepage 'http://android-apktool.googlecode.com/'
|
2013-02-05 13:55:27 +00:00
|
|
|
url 'https://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2'
|
|
|
|
sha1 '2dd828cf79467730c7406aa918f1da1bd21aaec8'
|
2011-09-11 11:53:57 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install 'apktool.jar'
|
|
|
|
|
2013-06-04 18:32:39 +00:00
|
|
|
ApktoolExecutables.new.brew do
|
2013-01-20 00:22:06 +00:00
|
|
|
libexec.install 'aapt', 'apktool'
|
2011-09-11 11:53:57 +00:00
|
|
|
end
|
2013-01-20 00:22:06 +00:00
|
|
|
|
|
|
|
# Make apktool look for jar and aapkt in libexec
|
|
|
|
inreplace "#{libexec}/apktool" do |s|
|
|
|
|
s.gsub! /^libdir=.*$/, "libdir=\"#{libexec}\""
|
|
|
|
s.gsub! "PATH=$PATH:`pwd`;", "PATH=$PATH:#{libexec};"
|
|
|
|
end
|
|
|
|
|
|
|
|
bin.install_symlink libexec/'apktool'
|
2011-09-11 11:53:57 +00:00
|
|
|
end
|
|
|
|
end
|