summaryrefslogtreecommitdiff
path: root/pcr/java-jackson-databind
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 02:04:55 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 02:04:55 -0500
commit2c9df99ffb432a08d566202857bf0a0a9b1c16de (patch)
treeb969a0de768114dac9fd470e3950bf06f46f1abb /pcr/java-jackson-databind
parent5910ca67aca4486a09087a1f06f76468ad60ec28 (diff)
downloadabslibre-2c9df99ffb432a08d566202857bf0a0a9b1c16de.tar.gz
abslibre-2c9df99ffb432a08d566202857bf0a0a9b1c16de.tar.bz2
abslibre-2c9df99ffb432a08d566202857bf0a0a9b1c16de.zip
java-jackson-databind: add new package to [pcr]
Diffstat (limited to 'pcr/java-jackson-databind')
-rw-r--r--pcr/java-jackson-databind/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/java-jackson-databind/PKGBUILD b/pcr/java-jackson-databind/PKGBUILD
new file mode 100644
index 000000000..9ede023d9
--- /dev/null
+++ b/pcr/java-jackson-databind/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=jackson-databind
+pkgname=java-${_pkgname}
+pkgver=2.8.5
+pkgrel=1
+pkgdesc='General data-binding functionality for Jackson: works on core streaming API'
+arch=('any')
+url="http://wiki.fasterxml.com/JacksonHome"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-jackson-annotations' 'java-jackson-core' 'jh')
+source=("https://github.com/FasterXML/${_pkgname}/archive/${_pkgname}-$pkgver.tar.gz")
+sha256sums=('375f20c52fef47473c1b5ef414ebb5f1a38abbe69592d6193657a84709641d1c')
+
+prepare() {
+ cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
+ mkdir -p build/classes
+ sed "s/@package@/com.fasterxml.jackson.databind.cfg/g
+ s/@projectversion@/$pkgver/g
+ s/@projectgroupid@/com.fasterxml.jackson.core/g
+ s/@projectartifactid@/jackson-databind/g" \
+ src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java.in > \
+ src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java
+}
+
+build() {
+ cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
+ CLASSPATH="/usr/share/java/jackson-annotations.jar:/usr/share/java/jackson-core.jar"
+ javac -cp $CLASSPATH -d build/classes $(find src/main/java -name \*.java)
+ javadoc -classpath $CLASSPATH -d build/javadoc -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"
+}