blob: 4de0200ef447b9dfdb0fcd2ae28d16273aeeccb4 (
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
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
_pkgname=jackson-annotations
pkgname=java-${_pkgname}
pkgver=2.8.5
pkgrel=1
pkgdesc='Core annotations used for value types, used by Jackson data binding package'
arch=('any')
url="http://wiki.fasterxml.com/JacksonHome"
license=('APACHE')
depends=('java-runtime')
makedepends=('java-environment' 'jh')
source=("https://github.com/FasterXML/${_pkgname}/archive/${_pkgname}-$pkgver.tar.gz")
sha256sums=('31484a8151cb1918b502ddac6d926a8ddc1cfa0f697b92b98c53a37eceacdbda')
prepare() {
cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
mkdir -p build/classes
}
build() {
cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
javac -d build/classes -encoding UTF-8 $(find src/main/java -name \*.java)
javadoc -d build/javadoc -encoding UTF-8 -sourcepath src/main/java -subpackages com
jar -cvf "${_pkgname}.jar" -C build/classes .
}
package() {
cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
# Install license file
install -Dm644 src/main/resources/META-INF/LICENSE \
"$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 com.fasterxml.jackson.core ${_pkgname} $pkgver \
pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar"
ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
"$pkgdir/usr/share/java/${_pkgname}.jar"
}
|