summaryrefslogtreecommitdiff
path: root/pcr/saxon6/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-03 09:24:51 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-03 09:24:51 -0500
commit50bf1fdcface8445c8b4fed58623fc85585a92c6 (patch)
tree9d61392661d3024e1a067a942f4ceb131a0c2d0a /pcr/saxon6/PKGBUILD
parent3746f94ddc8af9b5e62034a7c2d094a8c57a124e (diff)
saxon6: add new packages to [pcr]
Diffstat (limited to 'pcr/saxon6/PKGBUILD')
-rw-r--r--pcr/saxon6/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/pcr/saxon6/PKGBUILD b/pcr/saxon6/PKGBUILD
new file mode 100644
index 000000000..3fe0884a4
--- /dev/null
+++ b/pcr/saxon6/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_libname=saxon
+pkgname=${_libname}6
+pkgver=6.5.5
+_pkgver=$(echo $pkgver | tr . -)
+pkgrel=1
+pkgdesc="XSLT 1.0 / XPath 1.0 processor for Java"
+url="http://saxon.sourceforge.net/"
+license=('MPL')
+arch=('any')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-jdom1' 'jh')
+source=("http://sourceforge.net/projects/${_libname}/files/$pkgname/$pkgver/${_libname}${_pkgver}.zip"
+ 'pom.xml')
+sha1sums=('15e25fcf561ff173751ae992f2608f6f2e6204ed'
+ 'f9352e1e204e4cf93f2a33335288ceff9b3e2f16')
+
+prepare() {
+ cd ${srcdir}
+ rm -rv *.jar
+ rm -rvf {doc,samples}
+ mkdir -p {build/classes,src}
+ bsdtar -zxf source.zip -C src
+}
+
+build() {
+ cd $srcdir
+ CLASSPATH="/usr/share/java/jdom1.jar"
+ javac -cp $CLASSPATH -d build/classes -encoding ISO-8859-1 \
+ $(find src -name \*.java)
+ javadoc -classpath $CLASSPATH -d build/javadoc -encoding ISO-8859-1 \
+ -sourcepath src -subpackages com:org
+
+ jar -cvf "${_libname}-jdom.jar" -C build/classes/ com/icl/saxon/jdom
+
+ rm -r build/classes/com/icl/saxon/jdom
+ jar -cvf "${_libname}.jar" -C build/classes .
+}
+
+package() {
+ cd $srcdir
+
+ # 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 ${_libname} ${_libname} $pkgver \
+ pom.xml \
+ "${_libname}.jar" \
+ "${_libname}-$pkgver.jar"
+ ln -s "/usr/share/java/${_libname}-$pkgver.jar" \
+ "$pkgdir/usr/share/java/${_libname}.jar"
+
+ install -Dm644 "${_libname}-jdom.jar" \
+ "$pkgdir/usr/share/java/${_libname}-jdom-$pkgver.jar"
+ ln -s "/usr/share/java/${_libname}-jdom-$pkgver.jar" \
+ "$pkgdir/usr/share/java/${_libname}-jdom.jar"
+}