From ad32ff985d86421bad4ecf3f527316c41f62a6c7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Mar 2012 23:45:15 -0500 Subject: add libre/java-asm 3.3.1 --- libre/java-asm/PKGBUILD | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 libre/java-asm/PKGBUILD (limited to 'libre') diff --git a/libre/java-asm/PKGBUILD b/libre/java-asm/PKGBUILD new file mode 100644 index 000000000..382b9c177 --- /dev/null +++ b/libre/java-asm/PKGBUILD @@ -0,0 +1,83 @@ +# Maintainer: Luke Shumaker + +_pkgname=asm +pkgname=java-asm +pkgver=3.3.1 +pkgrel=2 +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.jar + cd "$srcdir/$_pkgname-$pkgver" + install -m644 output/dist/lib/all/README.txt "$pkgdir"/usr/share/java/asm +} + +md5sums=('433024df8176f09922646316e415631c') -- cgit v1.2.3-54-g00ecf