summaryrefslogtreecommitdiff
path: root/pcr/java-jackson-annotations
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 01:34:30 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 01:34:30 -0500
commit5910ca67aca4486a09087a1f06f76468ad60ec28 (patch)
tree822d739b7801662560b447eff765d6961d036d70 /pcr/java-jackson-annotations
parentd27b8ec39c46b1d55d50938f85b6e2ba08c4c9b1 (diff)
downloadabslibre-5910ca67aca4486a09087a1f06f76468ad60ec28.tar.gz
abslibre-5910ca67aca4486a09087a1f06f76468ad60ec28.tar.bz2
abslibre-5910ca67aca4486a09087a1f06f76468ad60ec28.zip
java-jackson-annotations: add new package to [pcr]
Diffstat (limited to 'pcr/java-jackson-annotations')
-rw-r--r--pcr/java-jackson-annotations/PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/java-jackson-annotations/PKGBUILD b/pcr/java-jackson-annotations/PKGBUILD
new file mode 100644
index 000000000..4de0200ef
--- /dev/null
+++ b/pcr/java-jackson-annotations/PKGBUILD
@@ -0,0 +1,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"
+}