blob: 45831b0338bd1e8ce8d4d130e4d9dc126ab21331 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# 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")
_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)
mksource() {
cd "$srcdir/$_pkgname-$pkgver"
rm test/conform/org/objectweb/asm/attrs/StackMapTableSample.data
rm test/conform/cases/*.class
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')
|