summaryrefslogtreecommitdiff
path: root/pcr/fontbox/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-21 14:22:39 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-12-21 14:22:39 -0500
commit6080574fbf993362ac816f1d55f5c7d2da90285f (patch)
tree3d077b9bf9b08f3764bf082ae887bdb49cdd100f /pcr/fontbox/PKGBUILD
parent624fb93327c101681acb0cb080e7422356f79c17 (diff)
fontbox: add new package to [pcr]
Diffstat (limited to 'pcr/fontbox/PKGBUILD')
-rw-r--r--pcr/fontbox/PKGBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/pcr/fontbox/PKGBUILD b/pcr/fontbox/PKGBUILD
new file mode 100644
index 000000000..d8cb0a9df
--- /dev/null
+++ b/pcr/fontbox/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=fontbox
+pkgver=1.8.10
+pkgrel=1
+pkgdesc="Java font library"
+arch=(any)
+url="https://pdfbox.apache.org"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-commons-logging' 'jh')
+source=("https://archive.apache.org/dist/pdfbox/${pkgver}/pdfbox-${pkgver}-src.zip")
+sha1sums=('0413f40458a33720e693ba02017ac6a514e856de')
+
+prepare() {
+ cd "${srcdir}/pdfbox-${pkgver}/${pkgname}"
+ mkdir -p build/classes
+}
+
+build() {
+ cd "${srcdir}/pdfbox-${pkgver}/${pkgname}"
+
+ CLASSPATH="/usr/share/java/commons-logging.jar"
+ javac -cp $CLASSPATH -d "build/classes" \
+ $(find "src/main/java" -name \*.java)
+ javadoc -classpath $CLASSPATH -d "build/javadoc" \
+ -sourcepath "src/main/java" -subpackages org
+
+ jar -cvf "${pkgname}.jar" -C "build/classes" .
+}
+
+package() {
+ cd "${srcdir}/pdfbox-${pkgver}/${pkgname}"
+
+ # 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.pdfbox" ${pkgname} ${pkgver} \
+ "pom.xml" \
+ "${pkgname}.jar" \
+ "${pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}.jar"
+}