summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-02 18:53:57 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-07-02 18:53:57 -0500
commit6b659a4b3b4351fdacf8119ab52c80f681c44e63 (patch)
tree05147fe363b3801f8a0c2d51ebc821d765108999 /pcr
parent3cffab767672f518757f9c797cb4ef8280eb981d (diff)
java-jdom1: add new packages to [pcr]
Diffstat (limited to 'pcr')
-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"
+}