# Maintainer: Lucas Werkmeister # TODO improve installation per https://wiki.archlinux.org/index.php/Java_package_guidelines – several of the dependencies have their own packages pkgname=apache-jena pkgver=4.5.0 pkgrel=1 pkgdesc='Java framework for building Semantic Web and Linked Data applications' arch=('any') url='https://jena.apache.org/' license=('Apache') depends=('java-runtime') source=("https://downloads.apache.org/${pkgname/apache-/}/binaries/${pkgname}-${pkgver}.tar.gz") sha512sums=('84e23ca41e8e38b286abf769d3ccdfe069f6157d58e0bb24e78d98ed5f8d598e06ededc16dd5bde0a494d5ee7c49ab9c4f5335cf63727a302e6b8b929d47457f') package() { cd "$pkgname-$pkgver" mkdir -p "$pkgdir/opt/${pkgname}/" "$pkgdir/usr/bin/" # install most files in /opt (yes, I know, I know :/ see TODO at the top) cp -r -t "$pkgdir/opt/${pkgname}/" bin/ lib/ LICENSE NOTICE README log4j2.properties # symlink binaries into /usr/bin cd bin for bin in *; do # some binaries conflict with other packages, so install them all with a "jena." prefix ln -s "../../opt/${pkgname}/bin/${bin}" "$pkgdir/usr/bin/jena.${bin}" case "$bin" in schemagen) # conflicts with a different binary by java-environment-common ;; tdbbackup|tdbdump) # conflicts with different binaries by tdb ;; *) # no conflicts, also install without "jena." prefix ln -s "jena.${bin}" "$pkgdir/usr/bin/${bin}" ;; esac done }