summaryrefslogtreecommitdiff
path: root/java/java-asm2/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-asm2/common.sh')
-rw-r--r--java/java-asm2/common.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/java/java-asm2/common.sh b/java/java-asm2/common.sh
index 6a664c9ff..ef4547696 100644
--- a/java/java-asm2/common.sh
+++ b/java/java-asm2/common.sh
@@ -13,21 +13,21 @@ makedepends=(
java-ow-util-ant-tasks
jh
)
-source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+source=("libre://$pkgname-$pkgver.tar.gz")
+mksource=("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/* .
+ ln -sf all/* .
}
package() {
@@ -48,12 +48,18 @@ package() {
# 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" \
+ for artifact in $(printf '%s\n' *.pom|sed 's/-[0-9.]*\.pom$//'); do
+ if [[ -f $artifact-$pkgver.jar ]]; then
+ # This artifact has a jar file
+ jh mvn-install $_pkgname $artifact $pkgver $artifact-$pkgver.{pom,jar}
+ # 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 \
+ ln -s $_pkgname/$artifact-$pkgver.jar \
"$pkgdir"/usr/share/java/$artifact-${pkgver%%.*}.jar
+ else
+ # This artifact is just a pom
+ jh mvn-install $_pkgname $artifact $pkgver $artifact-$pkgver.pom
+ fi
done
}