summaryrefslogtreecommitdiff
path: root/pcr/java-jackson-module-mrbean
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-10 02:13:06 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-10 02:13:06 -0500
commite2d7b93ce0a5de0168fd107c9ea7ec356c21c632 (patch)
treece20fd2a9afaeccd708efbaddfc94363f086963f /pcr/java-jackson-module-mrbean
parent7384884c390a60cfdf42f309456f2f95a7cea0e7 (diff)
downloadabslibre-e2d7b93ce0a5de0168fd107c9ea7ec356c21c632.tar.gz
abslibre-e2d7b93ce0a5de0168fd107c9ea7ec356c21c632.tar.bz2
abslibre-e2d7b93ce0a5de0168fd107c9ea7ec356c21c632.zip
java-jackson-module-mrbean: add new package to [pcr]
Diffstat (limited to 'pcr/java-jackson-module-mrbean')
-rw-r--r--pcr/java-jackson-module-mrbean/PKGBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/pcr/java-jackson-module-mrbean/PKGBUILD b/pcr/java-jackson-module-mrbean/PKGBUILD
new file mode 100644
index 000000000..543cf805d
--- /dev/null
+++ b/pcr/java-jackson-module-mrbean/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=jackson-module-mrbean
+pkgname=java-${_pkgname}
+pkgver=2.6.7
+pkgrel=1
+pkgdesc="Jackson extension that implements support for POJO type materialization"
+arch=('any')
+url="https://github.com/FasterXML/jackson-module-mrbean"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-asm' 'java-environment' 'java-jackson-core' 'java-jackson-databind' 'jh')
+source=("https://github.com/FasterXML/${_pkgname}/archive/${_pkgname}-$pkgver.tar.gz")
+sha256sums=('eff58db359c8ce48166ff5879684c6e0fb75b60b0ce15a3d12c0f22a83de1ef5')
+
+prepare() {
+ cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
+ mkdir -p build/classes
+
+ sed "s/@package@/com.fasterxml.jackson.module.mrbean/g
+ s/@projectversion@/$pkgver/g
+ s/@projectgroupid@/com.fasterxml.jackson.module/g
+ s/@projectartifactid@/jackson-modules-base/g" \
+ src/main/java/com/fasterxml/jackson/module/mrbean/PackageVersion.java.in > \
+ src/main/java/com/fasterxml/jackson/module/mrbean/PackageVersion.java
+}
+
+build() {
+ cd "$srcdir/${_pkgname}-${_pkgname}-$pkgver"
+ CLASSPATH="/usr/share/java/asm-4.jar:/usr/share/java/jackson-core.jar:/usr/share/java/jackson-databind.jar"
+ javac -cp $CLASSPATH -d build/classes \
+ $(find src/main/java -name \*.java)
+ javadoc -classpath $CLASSPATH -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.module ${_pkgname} $pkgver \
+ pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar"
+
+ ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
+ "$pkgdir/usr/share/java/${_pkgname}.jar"
+}