diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-08 19:30:07 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-02-08 19:30:07 -0500 |
commit | 47e90ec1e96d265b5cf2b63d2b22eb2453f60339 (patch) | |
tree | dbfda743fe143789e7378d2be512cf184e9ffb7c /pcr/java-semver | |
parent | 9570d67058bf977c82c9d6dfcbc5866ae4a2360b (diff) | |
download | abslibre-47e90ec1e96d265b5cf2b63d2b22eb2453f60339.tar.gz abslibre-47e90ec1e96d265b5cf2b63d2b22eb2453f60339.tar.bz2 abslibre-47e90ec1e96d265b5cf2b63d2b22eb2453f60339.zip |
java-semver: add new package to [pcr]
Diffstat (limited to 'pcr/java-semver')
-rw-r--r-- | pcr/java-semver/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/java-semver/PKGBUILD b/pcr/java-semver/PKGBUILD new file mode 100644 index 000000000..280802b58 --- /dev/null +++ b/pcr/java-semver/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_pkgname=semver +pkgname=java-${_pkgname} +pkgver=0.9.0 +pkgrel=1 +pkgdesc="Java implementation of the SemVer Specification" +arch=('any') +url="https://github.com/zafarkhaja/jsemver" +license=('MIT') +depends=('java-runtime') +makedepends=('java-environment' 'jh') +source=("https://github.com/zafarkhaja/j${_pkgname}/archive/$pkgver.tar.gz") +sha256sums=('9c5cbf3b8ab74d37b8f7fc51d448b4bf245b81616a9491bb26de9dc53444684b') + +prepare() { + cd "$srcdir/j${_pkgname}-$pkgver" + mkdir -p build/classes +} + +build() { + cd "$srcdir/j${_pkgname}-$pkgver" + javac -d build/classes $(find src/main/java -name \*.java) + javadoc -d build/javadoc -sourcepath src/main/java -subpackages com + jar -cvf "$pkgname.jar" -C build/classes . +} + +package() { + cd "$srcdir/j${_pkgname}-$pkgver" + + # Install license file + install -Dm644 LICENSE "$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 com.github.zafarkhaja $pkgname $pkgver \ + pom.xml "$pkgname.jar" "$pkgname-$pkgver.jar" + + ln -s "/usr/share/java/$pkgname-$pkgver.jar" \ + "$pkgdir/usr/share/java/$pkgname.jar" +} |