summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/proguard/PKGBUILD62
-rw-r--r--libre/proguard/proguard-fix_build.patch42
2 files changed, 104 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
+}
diff --git a/libre/proguard/proguard-fix_build.patch b/libre/proguard/proguard-fix_build.patch
new file mode 100644
index 000000000..2d0c7e5e5
--- /dev/null
+++ b/libre/proguard/proguard-fix_build.patch
@@ -0,0 +1,42 @@
+--- proguard5.2.1.orig/buildscripts/build.xml 2015-03-11 10:31:58.000000000 -0500
++++ proguard5.2.1/buildscripts/build.xml 2016-07-04 09:35:18.286198528 -0500
+@@ -4,16 +4,17 @@
+ default = "all"
+ basedir = "..">
+
+- <property file = "build/build.properties"/>
++ <property file = "buildscripts/build.properties"/>
+ <property name = "src" value = "src"/>
+ <property name = "classes" value = "classes"/>
+ <property name = "lib" value = "lib"/>
+
+- <property name = "gradle.jar1" value = "${gradle.home}/lib/plugins/gradle-plugins-2.2.1.jar"/>
+- <property name = "gradle.jar2" value = "${gradle.home}/lib/gradle-base-services-2.2.1.jar"/>
+- <property name = "gradle.jar3" value = "${gradle.home}/lib/gradle-base-services-groovy-2.2.1.jar"/>
+- <property name = "gradle.jar4" value = "${gradle.home}/lib/gradle-core-2.2.1.jar"/>
+- <property name = "gradle.jar5" value = "${gradle.home}/lib/groovy-all-2.3.6.jar"/>
++ <property name = "gradle.jar1" value = "${gradle.home}/lib/plugins/gradle-plugins-2.14.jar"/>
++ <property name = "gradle.jar2" value = "${gradle.home}/lib/gradle-base-services-2.14.jar"/>
++ <property name = "gradle.jar3" value = "${gradle.home}/lib/gradle-base-services-groovy-2.14.jar"/>
++ <property name = "gradle.jar4" value = "${gradle.home}/lib/gradle-core-2.14.jar"/>
++ <property name = "gradle.jar5" value = "${gradle.home}/lib/groovy-all-2.4.4.jar"/>
++ <property name = "gradle.jar6" value = "${gradle.home}/lib/gradle-logging-2.14.jar"/>
+ <property name = "wtk.jar" value = "${wtk.home}/wtklib/kenv.zip"/>
+
+ <target name = "all" depends = "basic,options"/>
+@@ -130,6 +131,7 @@
+ <available file="${gradle.jar3}"/>
+ <available file="${gradle.jar4}"/>
+ <available file="${gradle.jar5}"/>
++ <available file="${gradle.jar6}"/>
+ </and>
+ </not>
+ </condition>
+@@ -148,6 +150,7 @@
+ <path location="${gradle.jar3}"/>
+ <path location="${gradle.jar4}"/>
+ <path location="${gradle.jar5}"/>
++ <path location="${gradle.jar6}"/>
+ </classpath>
+ </javac>
+