From 6b659a4b3b4351fdacf8119ab52c80f681c44e63 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Sat, 2 Jul 2016 18:53:57 -0500 Subject: java-jdom1: add new packages to [pcr] --- pcr/java-jdom1/PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pcr/java-jdom1/PKGBUILD (limited to 'pcr') 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 + +_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" +} -- cgit v1.2.3-54-g00ecf