summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaruue Icymoon2017-08-20 11:36:06 +0800
committerHaruue Icymoon2017-08-20 11:36:06 +0800
commitcb53c316c440c24dd8fa49e7c4bb46d6edec5816 (patch)
tree2b3894f1e529654ec3b53088a339c8df3c3a566f
downloadaur-cb53c316c440c24dd8fa49e7c4bb46d6edec5816.tar.gz
Initialize packages
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD45
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2d70e92bb7f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = dex2jar-git
+ pkgdesc = Tools to work with android .dex and java .class files, git version
+ pkgver = 2.1.nightly.26.r49.g1d51507
+ pkgrel = 2
+ url = https://github.com/pxb1988/dex2jar
+ arch = i686
+ arch = x86_64
+ license = Apache-2.0
+ makedepends = java-environment>=7
+ makedepends = git
+ makedepends = gradle
+ depends = java-runtime
+ provides = dex2jar=2.1.nightly.26.r49.g1d51507
+ conflicts = dex2jar
+ source = dex2jar::git+https://github.com/pxb1988/dex2jar
+ md5sums = SKIP
+
+pkgname = dex2jar-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c2f9a248dc4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Haruue Icymoon <haruue@caoyue.com.cn>
+
+pkgname=dex2jar-git
+pkgver=2.1.nightly.26.r49.g1d51507
+pkgrel=2
+pkgdesc='Tools to work with android .dex and java .class files, git version'
+arch=('i686' 'x86_64')
+url='https://github.com/pxb1988/dex2jar'
+conflicts=("${pkgname%-git}")
+provides=("${pkgname%-git}=$pkgver")
+license=('Apache-2.0')
+depends=('java-runtime')
+makedepends=('java-environment>=7' 'git' 'gradle')
+source=("${pkgname%-git}"::'git+https://github.com/pxb1988/dex2jar')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ gradle clean installDist
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/opt/${pkgname%-git}/bin"
+ mkdir -p "$pkgdir/opt/${pkgname%-git}/lib"
+ mkdir -p "$pkgdir/usr/share/licenses/${pkgname%-git}"
+
+ install -m755 "$srcdir/${pkgname%-git}"/dex-tools/build/install/dex-tools/*.sh "$pkgdir/opt/${pkgname%-git}"
+ install -m755 "$srcdir/${pkgname%-git}"/dex-tools/build/install/dex-tools/bin/dex-tools "$pkgdir/opt/${pkgname%-git}/bin"
+ install -m644 "$srcdir/${pkgname%-git}"/dex-tools/build/install/dex-tools/lib/* "$pkgdir/opt/${pkgname%-git}/lib"
+ install -m644 "$srcdir/${pkgname%-git}"/dex-tools/build/install/dex-tools/NOTICE.txt "$pkgdir/opt/${pkgname%-git}"
+ install -m644 "$srcdir/${pkgname%-git}"/dex-tools/build/install/dex-tools/LICENSE.txt "$pkgdir/usr/share/licenses/${pkgname%-git}"
+
+ for i in $(ls "$pkgdir"/opt/"${pkgname%-git}"/*.sh); do
+ f=$(basename $i)
+ ln -s "/opt/${pkgname%-git}/$f" "$pkgdir/usr/bin/${f%.sh}"
+ done
+
+ ln -s "d2j-dex2jar" "$pkgdir/usr/bin/dex2jar"
+}