blob: 001ff1489137ff24772dcba218279ddec4c301e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# $Id$
# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=proguard
pkgver=5.3.3
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)
sha256sums=('95bf9580107f00d0e26f01026dcfe9e7a772e5449488b03ba832836c3760b3af')
prepare() {
cd "$srcdir/$pkgname$pkgver"
rm -rv lib/*.jar
rm -rv {docs,examples}
}
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
}
|