summaryrefslogtreecommitdiff
path: root/pcr/java-jdom1
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/java-jdom1')
-rw-r--r--pcr/java-jdom1/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/pcr/java-jdom1/PKGBUILD b/pcr/java-jdom1/PKGBUILD
new file mode 100644
index 000000000..05201156d
--- /dev/null
+++ b/pcr/java-jdom1/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_libname=jdom
+pkgname=java-${_libname}1
+pkgver=1.1.3
+pkgrel=1.parabola1
+pkgdesc="Older version of XML Parsing Library for Java"
+arch=('any')
+url="http://www.jdom.org"
+license=('GPL')
+depends=('java-runtime')
+conflicts=('java-jdom')
+provides=("java-jdom=$pkgver")
+makedepends=('apache-ant' 'jh')
+source=("https://github.com/hunterhacker/${_libname}/archive/${_libname}-$pkgver.tar.gz")
+sha1sums=('2a8d80da5046b62b3130ab22eda058e8f02a6ade')
+
+prepare() {
+ cd "$srcdir/${_libname}-${_libname}-$pkgver"
+ rm -rv {core,contrib,test}/lib/*.jar
+ sed -i "s/@artifactID@/${_libname}/g" maven.pom
+ sed -i "s/@version@/$pkgver/g" maven.pom
+ sed -i "s/@jdk@/1.2/g" maven.pom
+}
+
+build() {
+ cd "$srcdir/${_libname}-${_libname}-$pkgver"
+ ant build.core \
+ -Dversion=$pkgver
+}
+
+package() {
+ cd "$srcdir/${_libname}-${_libname}-$pkgver"
+
+ # Install license file
+ install -Dm644 core/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+
+ # Install documentation
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r core/build/apidocs "$pkgdir/usr/share/doc/$pkgname"
+ cp -r core/samples "$pkgdir/usr/share/doc/$pkgname/examples"
+
+ # Install Maven artifacts
+ export DESTDIR=$pkgdir
+ jh mvn-install "org.${_libname}" ${_libname} $pkgver \
+ maven.pom \
+ "core/build/${_libname}-$pkgver.jar" \
+ "${_libname}-$pkgver.jar"
+ ln -s "/usr/share/java/${_libname}-$pkgver.jar" \
+ "${pkgdir}/usr/share/java/${_libname}1.jar"
+}