summaryrefslogtreecommitdiff
path: root/libre/proguard/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-04 10:49:09 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-04 10:49:09 -0500
commit3dedd7d413edfba2fdd6d491c863c64632846122 (patch)
treea11b55f6738e4cccece66703c89f796640a202ac /libre/proguard/PKGBUILD
parentad640781b9a9c2ca3515a25f85e86731ec9c2483 (diff)
downloadabslibre-3dedd7d413edfba2fdd6d491c863c64632846122.tar.gz
abslibre-3dedd7d413edfba2fdd6d491c863c64632846122.tar.bz2
abslibre-3dedd7d413edfba2fdd6d491c863c64632846122.zip
proguard: add new package to [libre]
Diffstat (limited to 'libre/proguard/PKGBUILD')
-rw-r--r--libre/proguard/PKGBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/libre/proguard/PKGBUILD b/libre/proguard/PKGBUILD
new file mode 100644
index 000000000..096fbc518
--- /dev/null
+++ b/libre/proguard/PKGBUILD
@@ -0,0 +1,62 @@
+# $Id$
+# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=proguard
+pkgver=5.2.1
+pkgrel=1.parabola1
+pkgdesc="free Java class file shrinker, optimizer, obfuscator, and preverifier"
+arch=(any)
+url="http://proguard.sourceforge.net/"
+license=('GPL2')
+depends=('java-runtime')
+makedepends=('apache-ant' 'gradle' 'jh')
+source=(http://downloads.sourceforge.net/proguard/proguard$pkgver.tar.gz
+ proguard-fix_build.patch)
+md5sums=('e94cf25b7947a0d3bbe7410f87f87c58'
+ 'e6ca4ce58dc2ccdd860203e37687e82a')
+
+prepare() {
+ cd "$srcdir/$pkgname$pkgver"
+ rm -rv lib/*.jar
+ rm -rv {docs,examples}
+ patch -Np1 -i "${srcdir}/proguard-fix_build.patch"
+}
+
+build() {
+ cd "$srcdir/$pkgname$pkgver"
+ ant basic anttask gradletask \
+ -f buildscripts/build.xml \
+ -Dgradle.home=/usr/share/java/gradle
+}
+
+package() {
+ cd "$srcdir/$pkgname$pkgver/lib"
+
+ mkdir -p $pkgdir/usr/bin
+ mkdir -p $pkgdir/usr/share/proguard
+ install -D -m0644 proguardgui.jar proguard.jar retrace.jar $pkgdir/usr/share/proguard/
+
+ cat >$pkgdir/usr/bin/proguardgui <<EOF
+#!/bin/sh
+exec java -jar /usr/share/proguard/proguardgui.jar \$*
+EOF
+ chmod 0755 $pkgdir/usr/bin/proguardgui
+
+ cat >$pkgdir/usr/bin/proguard <<EOF
+#!/bin/sh
+exec java -jar /usr/share/proguard/proguard.jar \$*
+EOF
+ chmod 0755 $pkgdir/usr/bin/proguard
+
+ # FS#36268
+ ln -s . $pkgdir/usr/share/proguard/lib
+
+ # Install Maven artifacts
+ export DESTDIR=$pkgdir
+ for artifact in base gradle; do
+ jh mvn-install net.sf.proguard $pkgname-$artifact $pkgver \
+ "../buildscripts/maven/$artifact/pom.xml" \
+ "$pkgname.jar"
+ done
+}