blob: 7d87ef5bb102ec5cdbbb2187f138ad7e44011114 (
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
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
_pkgname=commons-compress
pkgname=java-${_pkgname}
pkgver=1.13
pkgrel=1
pkgdesc="Java API for working with tar, zip and bzip2 files"
arch=('any')
url="http://commons.apache.org/compress/"
license=('APACHE')
depends=('java-runtime')
makedepends=('java-environment' 'jh' 'xz-java')
source=("https://archive.apache.org/dist/commons/compress/source/${_pkgname}-$pkgver-src.tar.gz")
sha256sums=('88754be9a343c7af60498b7ec8b7c07c4551b6f991cd609d5b6a019bb7da58ee')
prepare() {
cd "$srcdir/${_pkgname}-$pkgver-src"
mkdir -p build/classes
}
build() {
cd "$srcdir/${_pkgname}-$pkgver-src"
CLASSPATH="/usr/share/java/xz.jar"
javac -cp $CLASSPATH -d build/classes -encoding UTF-8 \
$(find src/main/java -name \*.java)
javadoc -classpath $CLASSPATH -d build/javadoc -encoding UTF-8 \
-sourcepath src/main/java -subpackages org
jar -cvf "${_pkgname}.jar" -C build/classes .
}
package() {
cd "$srcdir/${_pkgname}-$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.commons ${_pkgname} $pkgver \
pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar"
ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
"$pkgdir/usr/share/java/${_pkgname}.jar"
}
|