blob: 9f42e977de8390e51363b0386368c9fac6035dc9 (
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
|
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
_pkgname=asm
pkgname=java-asm2
pkgver=2.2.3
pkgrel=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
)
source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
build() {
cd "$srcdir/$_pkgname-$pkgver"
mkdir -p test/lib
echo 'objectweb.ant.tasks.path /usr/share/java/ow_util_ant_tasks.jar' >> build.properties
ant dist
}
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-attrs $pkgver
mvn-install asm asm-commons $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
# 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-2.jar
cd "$srcdir/$_pkgname-$pkgver"
install -m644 output/dist/lib/all/README.txt "$pkgdir"/usr/share/java/asm/README-$pkgver.txt
}
md5sums=('7a92c87bf067925685cf68dcc0dd8998')
|