summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/saxon6/PKGBUILD61
-rw-r--r--pcr/saxon6/pom.xml6
2 files changed, 67 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"
+}
diff --git a/pcr/saxon6/pom.xml b/pcr/saxon6/pom.xml
new file mode 100644
index 000000000..b003393b3
--- /dev/null
+++ b/pcr/saxon6/pom.xml
@@ -0,0 +1,6 @@
+<project>
+<modelVersion>4.0.0</modelVersion>
+<groupId>saxon</groupId>
+<artifactId>saxon</artifactId>
+<version>6.5.5</version>
+</project> \ No newline at end of file