summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-19 12:35:27 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-19 12:35:27 -0400
commita565b1de49060d5839f0f053761d81c4671270f4 (patch)
treeb00ceff9617f4d8a673b4b002c1c3c444aaefe7f /java
parent75f10c84822529dc782da5ad95b092cb15a427c4 (diff)
refactor common code out of java/java-asm{2,3}/PKGBUILD
Diffstat (limited to 'java')
-rw-r--r--java/java-asm2/PKGBUILD70
-rw-r--r--java/java-asm2/common.sh59
-rw-r--r--java/java-asm3/PKGBUILD74
3 files changed, 70 insertions, 133 deletions
diff --git a/java/java-asm2/PKGBUILD b/java/java-asm2/PKGBUILD
index 45831b033..3541c20ab 100644
--- a/java/java-asm2/PKGBUILD
+++ b/java/java-asm2/PKGBUILD
@@ -1,32 +1,12 @@
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
-_pkgname=asm
-pkgname=java-asm2
pkgver=2.2.3
-pkgrel=4
-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
- jh
-)
-source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+. common.sh
-_distdir="$_pkgname-$pkgver/output/dist"
-_ow_util_ant_tasks='/usr/share/java/ow_util_ant_tasks.jar'
-_m2_artifacts=(
- asm
- asm-analysis
- asm-attrs
- asm-commons
- asm-tree
- asm-util
- asm-xml
- asm-all)
+####
+
+pkgrel=5
+_checksource_ignore=('test/conform/org/objectweb/asm/signature/signatures.txt')
mksource() {
cd "$srcdir/$_pkgname-$pkgver"
@@ -35,44 +15,4 @@ mksource() {
mkdir -p test/lib
}
-build() {
- cd "$srcdir/$_pkgname-$pkgver"
- eval `jh mksource test/conform/org/objectweb/asm/signature/signatures.txt`
-
- 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 "${_m2_artifacts[@]}"; 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
-}
-
md5sums=('7a92c87bf067925685cf68dcc0dd8998')
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
+}
diff --git a/java/java-asm3/PKGBUILD b/java/java-asm3/PKGBUILD
index 3af6902f4..e85896b72 100644
--- a/java/java-asm3/PKGBUILD
+++ b/java/java-asm3/PKGBUILD
@@ -1,79 +1,17 @@
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
-_pkgname=asm
-pkgname=java-asm3
-_pkgver=3
pkgver=3.3.1
-pkgrel=4.1
-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
- jh
-)
-source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+. ../java-asm2/common.sh
-_distdir="$_pkgname-$pkgver/output/dist"
-_ow_util_ant_tasks='/usr/share/java/ow_util_ant_tasks.jar'
-_m2_artifacts=(
- asm
- asm-analysis
- asm-commons
- asm-parent
- asm-tree
- asm-util
- asm-xml
- asm-all
- asm-debug-all)
+####
-mksource()
+pkgrel=5
+_checksource_ignore=(src/org/objectweb/asm/optimizer/jdk{1.2.2_017,1.3.1_19}.txt.gz)
+
+mksource() {
cd "$srcdir/$_pkgname-$pkgver"
rm cobertura.ser # We regenerate this
rm examples/jasmin/test/jasmin.jar
}
-build() {
- cd "$srcdir/$_pkgname-$pkgver"
- eval `jh mksource`
-
- 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 "${_m2_artifacts[@]}"; 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
-}
-
md5sums=('433024df8176f09922646316e415631c')