diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-07 23:33:56 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-07 23:33:56 -0500 |
commit | 22e9ee8d49a7895c9c998a5f14065d2e974b87af (patch) | |
tree | 8fc3c82f99e5dc1b8fa4b465e11d77209d7e3b5c /pcr | |
parent | 3829d338a91bd3761393960acfc3ca038d28db42 (diff) | |
download | abslibre-22e9ee8d49a7895c9c998a5f14065d2e974b87af.tar.gz abslibre-22e9ee8d49a7895c9c998a5f14065d2e974b87af.tar.bz2 abslibre-22e9ee8d49a7895c9c998a5f14065d2e974b87af.zip |
java-commons-exec: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/java-commons-exec/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/java-commons-exec/PKGBUILD b/pcr/java-commons-exec/PKGBUILD new file mode 100644 index 000000000..5240be670 --- /dev/null +++ b/pcr/java-commons-exec/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_pkgname=commons-exec +pkgname=java-${_pkgname} +pkgver=1.3 +pkgrel=1 +pkgdesc="API for dealing with external process execution and environment management" +arch=('any') +url="http://commons.apache.org/exec/" +license=('APACHE') +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("https://archive.apache.org/dist/commons/exec/source/${_pkgname}-$pkgver-src.tar.gz") +sha256sums=('db0742fa59b7d69375e5d99e827aee0bf06ac527aa6def63618950e40c24cb9f') + +prepare() { + cd "$srcdir/${_pkgname}-$pkgver-src" + mkdir -p build/classes +} + +build() { + cd "$srcdir/${_pkgname}-$pkgver-src" + javac -d build/classes $(find src/main/java -name \*.java) + javadoc -d build/javadoc -sourcepath src/main/java -subpackages org + jar -cvf "${_pkgname}.jar" -C build/classes . +} + +package() { + cd "$srcdir/${_pkgname}-$pkgver-src" + + # Install license file + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + + # 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 org.apache.commons ${_pkgname} $pkgver \ + pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar" + + ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \ + "$pkgdir/usr/share/java/${_pkgname}.jar" +} |