blob: bb287500851f3edf91955f04509084b532106d68 (
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
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
_libname=bcel
pkgname=java-${_libname}
pkgver=6.0
pkgrel=1.parabola1
pkgdesc="Java library to analyze, create, and manipulate (binary) Java class files"
arch=('any')
url='https://commons.apache.org/proper/commons-bcel/'
license=('APACHE')
depends=('java-runtime')
makedepends=('java-environment' 'jh')
source=("http://archive.apache.org/dist/jakarta/${_libname}/source/${_libname}-$pkgver-src.tar.gz")
sha256sums=('b963b9f0614f17de40da1de265e44476b80a8cc8a36c07a3acfe48f603306958')
prepare() {
cd "$srcdir/${_libname}-$pkgver-src"
mkdir -p build/classes
}
build() {
cd "$srcdir/${_libname}-$pkgver-src"
javac -d build/classes -encoding UTF-8 \
$(find src/main/java -name \*.java)
javadoc -sourcepath src/main/java -d build/javadoc \
-encoding UTF-8 -subpackages org
jar -cvf "${_libname}.jar" -C build/classes .
}
package() {
cd "$srcdir/${_libname}-$pkgver-src"
# Install license file
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
# Install documentation
install -d "$pkgdir/usr/share/doc/$pkgname"
cp -r build/javadoc "$pkgdir/usr/share/doc/$pkgname"
# Install Maven artifacts
export DESTDIR=$pkgdir
jh mvn-install "org.apache.${_libname}" ${_libname} $pkgver \
pom.xml "${_libname}.jar" "${_libname}.jar"
ln -s "/usr/share/java/${_libname}.jar" \
"$pkgdir/usr/share/java/${_libname}-$pkgver.jar"
}
|