summaryrefslogtreecommitdiff
path: root/java/java-asm2/common.sh
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-10-20 19:18:39 -0200
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-10-20 19:18:39 -0200
commitcd308f9d2c6a48520b4903d3394eb88c6fd9c8d5 (patch)
tree366b73bb65dd0705ed5f0bee7157ea6a267e9a8a /java/java-asm2/common.sh
parentabdaf4e8e1fa45d4617a581c1e831e8d0bf01bcd (diff)
parentc375e36ec4c4e0b3c276e2b71bdd0651fa1a6a1d (diff)
downloadabslibre-cd308f9d2c6a48520b4903d3394eb88c6fd9c8d5.tar.gz
abslibre-cd308f9d2c6a48520b4903d3394eb88c6fd9c8d5.tar.bz2
abslibre-cd308f9d2c6a48520b4903d3394eb88c6fd9c8d5.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'java/java-asm2/common.sh')
-rw-r--r--java/java-asm2/common.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/java/java-asm2/common.sh b/java/java-asm2/common.sh
new file mode 100644
index 000000000..6a664c9ff
--- /dev/null
+++ b/java/java-asm2/common.sh
@@ -0,0 +1,59 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=asm
+pkgname=java-asm${pkgver%%.*}
+pkgdesc="An all purpose Java bytecode manipulation and analysis framework."
+url="http://asm.ow2.org/"
+license=('custom:BSD3')
+
+arch=('any')
+depends=('java-runtime')
+makedepends=(
+ apache-ant
+ java-ow-util-ant-tasks
+ jh
+)
+source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+
+_distdir="$_pkgname-$pkgver/output/dist"
+_ow_util_ant_tasks='/usr/share/java/ow_util_ant_tasks.jar'
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ eval `jh mksource ${_checksource_ignore[@]}`
+
+ echo "objectweb.ant.tasks.path $_ow_util_ant_tasks" >> build.properties
+ ant dist
+
+ # This will make package() easier:
+ cd "$srcdir/$_distdir/lib"
+ ln -s all/* .
+}
+
+package() {
+ # Install license file
+ cd "$srcdir/$_pkgname-$pkgver"
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Install documentation
+ cd "$srcdir/$_distdir"
+ 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 the README about the -all files
+ cd "$srcdir/$_distdir/lib"
+ install -Dm644 README.txt \
+ "$pkgdir"/usr/share/java/$_pkgname/README-$pkgver.txt
+
+ # Install Maven artifacts
+ export DESTDIR=$pkgdir
+ for artifact in $(ls *.jar|sed 's/-[0-9.]*\.jar$//'); do
+ jh mvn-install $_pkgname $artifact $pkgver $artifact-$pkgver.{jar,pom}
+ # Symlink them to /usr/share/java
+ ln -s "$(jh mvn-basename asm $artifact $pkgver).jar" \
+ "$pkgdir"/usr/share/java/$_pkgname/
+ ln -s $_pkgname/$artifact-$pkgver.jar \
+ "$pkgdir"/usr/share/java/$artifact-${pkgver%%.*}.jar
+ done
+}