summaryrefslogtreecommitdiff
path: root/libre/java-asm3
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-06 00:01:33 +0000
committerroot <root@rshg054.dnsready.net>2012-03-06 00:01:33 +0000
commitb8afacf1f28ac27321feb9b92bd50dd8961b7736 (patch)
treede441882aca38091a1e438e1d8da8a9af3bd023a /libre/java-asm3
parent11711de1942a141f28faef695c4c78c8357fbf23 (diff)
Tue Mar 6 00:01:33 UTC 2012
Diffstat (limited to 'libre/java-asm3')
-rw-r--r--libre/java-asm3/PKGBUILD83
1 files changed, 83 insertions, 0 deletions
diff --git a/libre/java-asm3/PKGBUILD b/libre/java-asm3/PKGBUILD
new file mode 100644
index 000000000..2c6a7f933
--- /dev/null
+++ b/libre/java-asm3/PKGBUILD
@@ -0,0 +1,83 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=asm
+pkgname=java-asm3
+pkgver=3.3.1
+pkgrel=3
+pkgdesc="An all purpose Java bytecode manipulation and analysis framework."
+arch=('any')
+url="http://asm.ow2.org/"
+license=('custom:BSD3')
+depends=('java-runtime')
+makedepends=(
+ apache-ant
+ java-ow-util-ant-tasks
+)
+source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ rm cobertura.ser # We regenerate this
+ rm examples/jasmin/test/jasmin.jar
+
+ echo 'objectweb.ant.tasks.path /usr/share/java/ow_util_ant_tasks.jar' >> build.properties
+ ant dist
+}
+
+# Tests have more dependencies, and I can't be bothered to package them.
+#check() {
+# cd "$srcdir/$_pkgname-$pkgver"
+# ant test
+#}
+
+mvn-install() {
+ group=$1
+ pkg=$2
+ ver=$3
+
+ dir="$pkgdir"/usr/share/maven/repository/$group/$pkg/$ver
+ install -d "$dir"
+ cp $pkg-$pkgver.* "$dir"
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ # Install license file
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Install documentation
+ cd output/dist
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r doc/javadoc/user "$pkgdir/usr/share/doc/$pkgname/javadoc"
+ cp -r examples "$pkgdir/usr/share/doc/$pkgname/examples"
+
+ # Install Apache Maven modules
+ cd lib
+ mvn-install asm asm $pkgver
+ mvn-install asm asm-analysis $pkgver
+ mvn-install asm asm-commons $pkgver
+ mvn-install asm asm-parent $pkgver
+ mvn-install asm asm-tree $pkgver
+ mvn-install asm asm-util $pkgver
+ mvn-install asm asm-xml $pkgver
+ cd all
+ mvn-install asm asm-all $pkgver
+ mvn-install asm asm-debug-all $pkgver
+
+ # Synlink Maven modules to /usr/share/java
+ install -d "$pkgdir"/usr/share/java/asm
+ cd "$pkgdir"
+ find usr/share/maven/repository/asm \
+ -type f -name '*.jar' -printf '/%p\n' | while read jar; do
+ ln -s "$jar" "$pkgdir"/usr/share/java/asm
+ done
+
+ # Put the finishing touches on /usr/share/java
+ ln -s "asm/asm-$pkgver.jar" "$pkgdir"/usr/share/java/asm-3.jar
+ cd "$srcdir/$_pkgname-$pkgver"
+ install -m644 output/dist/lib/all/README.txt "$pkgdir"/usr/share/java/asm/README-$pkgver.txt
+}
+
+md5sums=('433024df8176f09922646316e415631c')