summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Ritchie2016-04-08 05:59:32 -0400
committerLuc Ritchie2016-04-08 06:10:42 -0400
commit0d1b1807225106067d74dfbd8804b8cf8bdd3f7f (patch)
tree21e132644beede60c25a2fc090fceb70b69759e1
parentd6678c50b93e8a28832850fb331120b856b026a7 (diff)
downloadaur-0d1b1807225106067d74dfbd8804b8cf8bdd3f7f.tar.gz
Finally sort out that vendor.zip nonsense
The approach here is to depend on android-apktool, and to use a setup script that creates symlinks to apktool.jar. We also patch the language files to ask the user to run this setup script instead of downloading random binaries.
-rw-r--r--.SRCINFO18
-rw-r--r--APKTOOL_VERSION8
-rw-r--r--PKGBUILD33
-rwxr-xr-xapkstudio-setup.sh12
-rw-r--r--change-vendor-zip-warning.patch11
5 files changed, 64 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bc6b8e668e5c..4be7f47c2e3b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,11 @@
+# Generated by mksrcinfo v8
+# Fri Apr 8 10:05:14 UTC 2016
pkgbase = apkstudio-git
pkgdesc = An IDE for decompiling/editing & then recompiling of android application binaries.
- pkgver = 3.0.0.b2.r33.gbab0183
+ pkgver = r100.9e114ca
pkgrel = 1
- url = http://github.vaibhavpandey.com/apkstudio/
+ epoch = 1
+ url = http://www.vaibhavpandey.com/apkstudio/
arch = i686
arch = x86_64
license = GPL2
@@ -10,11 +13,16 @@ pkgbase = apkstudio-git
makedepends = qt5-tools
makedepends = unzip
depends = qt5-base
- noextract = vendor.zip
+ depends = android-tools
+ depends = android-apktool
source = git+https://github.com/vaibhavpandeyvpz/apkstudio.git
- source = https://bintray.com/artifact/download/vaibhavpandeyvpz/generic/2015.10.29/vendor.zip
+ source = APKTOOL_VERSION
+ source = apkstudio-setup.sh
+ source = change-vendor-zip-warning.patch
sha256sums = SKIP
- sha256sums = b089427ee80aff65e87cb19ca2f08cd74d156a1b692da86a1ba37aa39689f539
+ sha256sums = ff6ea79b60edfc59c6556ba1f349aae9da3cbb99d5d35239521ebb8f3a201a8c
+ sha256sums = f750ecf7d4ddf14922aa52e98ec37f6277692bd88f934f4a3a41b0e888017a1d
+ sha256sums = addf387dfb760341e694c9fe50900b7e39acd71f4ff7e3b793ae9347c2b9c0ab
pkgname = apkstudio-git
diff --git a/APKTOOL_VERSION b/APKTOOL_VERSION
new file mode 100644
index 000000000000..9b89dec7ed19
--- /dev/null
+++ b/APKTOOL_VERSION
@@ -0,0 +1,8 @@
+{
+ "apktool": {
+ "commit": "180728d6b8def11cb84280be7a242ed13e5422a3",
+ "tag": "2.1.0",
+ "url": "https://ibotpeaches.github.io/Apktool/"
+ }
+}
+
diff --git a/PKGBUILD b/PKGBUILD
index 48962c5dc766..6ad3b7abbf82 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,37 +3,44 @@
_pkgname=apkstudio
pkgname=$_pkgname-git
-pkgver=3.0.0.b2.r33.gbab0183
+pkgver=r100.9e114ca
pkgrel=1
+epoch=1
pkgdesc='An IDE for decompiling/editing & then recompiling of android application binaries.'
arch=('i686' 'x86_64')
-url='http://github.vaibhavpandey.com/apkstudio/'
+url='http://www.vaibhavpandey.com/apkstudio/'
license=('GPL2')
-depends=('qt5-base')
+depends=('qt5-base' 'android-tools' 'android-apktool')
makedepends=('git' 'qt5-tools' 'unzip')
source=('git+https://github.com/vaibhavpandeyvpz/apkstudio.git'
-'https://bintray.com/artifact/download/vaibhavpandeyvpz/generic/2015.10.29/vendor.zip')
+ 'APKTOOL_VERSION'
+ 'apkstudio-setup.sh'
+ 'change-vendor-zip-warning.patch')
sha256sums=('SKIP'
- 'b089427ee80aff65e87cb19ca2f08cd74d156a1b692da86a1ba37aa39689f539')
-noextract=('vendor.zip')
+ 'ff6ea79b60edfc59c6556ba1f349aae9da3cbb99d5d35239521ebb8f3a201a8c'
+ 'f750ecf7d4ddf14922aa52e98ec37f6277692bd88f934f4a3a41b0e888017a1d'
+ 'addf387dfb760341e694c9fe50900b7e39acd71f4ff7e3b793ae9347c2b9c0ab')
pkgver() {
cd "$srcdir/$_pkgname"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ patch -p0 -i ../change-vendor-zip-warning.patch
}
build() {
cd "$srcdir/$_pkgname"
lrelease-qt5 res/lang/en.ts
- mkdir build
- cd build
- qmake-qt5 -r ../apkstudio.pro CONFIG+=release
+ qmake-qt5 -r apkstudio.pro CONFIG+=release
make
}
package() {
cd "$srcdir"
- install -Dm755 "$_pkgname/build/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
- install -dm755 "$pkgdir/usr/share/apkstudio/vendor"
- unzip "vendor.zip" -d "$pkgdir/usr/share/apkstudio/vendor"
+ install -Dm755 "$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+ install -Dm744 'APKTOOL_VERSION' "$pkgdir/usr/share/$pkgname/APKTOOL_VERSION"
+ install -Dm755 'apkstudio-setup.sh' "$pkgdir/usr/bin/apkstudio-setup.sh"
}
diff --git a/apkstudio-setup.sh b/apkstudio-setup.sh
new file mode 100755
index 000000000000..adc640667de9
--- /dev/null
+++ b/apkstudio-setup.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -eu
+echo APK Studio normally requires you to download \"vendor.zip\" and extract it.
+echo It contains apktool.jar. Since that\'s a dependency of this package, this
+echo script will instead create symbolic links in $HOME/.apkstudio/vendor/.
+echo
+
+mkdir -p "$HOME/.apkstudio/vendor/"
+[ -e "$HOME/.apkstudio/vendor/apktool.jar" ] || ln -s "/usr/share/android-apktool/apktool.jar" "$HOME/.apkstudio/vendor/apktool.jar"
+[ -e "$HOME/.apkstudio/vendor/VERSION" ] || ln -s "/usr/share/apkstudio-git/APKTOOL_VERSION" "$HOME/.apkstudio/vendor/VERSION"
+
+echo You may now use APK Studio. Have a nice day!
diff --git a/change-vendor-zip-warning.patch b/change-vendor-zip-warning.patch
new file mode 100644
index 000000000000..ce385cb217fd
--- /dev/null
+++ b/change-vendor-zip-warning.patch
@@ -0,0 +1,11 @@
+--- res/lang/en.ts 2016-04-08 05:33:01.927645775 -0400
++++ res/lang/en.ts.new 2016-04-08 05:38:46.388668962 -0400
+@@ -319,7 +319,7 @@
+ </message>
+ <message>
+ <source>download_vendor</source>
+- <translation><![CDATA[You need to download some 3rd-party applications/files from <a href="%1">here</a> and place them in <strong>%2</strong> for APK Studio to work.]]></translation>
++ <translation><![CDATA[You need to run apkstudio-setup.sh first for APK Studio to work.]]></translation>
+ </message>
+ <message>
+ <source>decode_failure</source>