summaryrefslogtreecommitdiff
path: root/pcr/java-commons-lang3
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-08 00:12:20 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-08 00:12:20 -0500
commit8b1e51320c7fdd5729cafa52bcafb1e56eb9086b (patch)
tree9ae8c3c0f010de7500fe365126e5e7f342b63e4c /pcr/java-commons-lang3
parent22e9ee8d49a7895c9c998a5f14065d2e974b87af (diff)
downloadabslibre-8b1e51320c7fdd5729cafa52bcafb1e56eb9086b.tar.gz
abslibre-8b1e51320c7fdd5729cafa52bcafb1e56eb9086b.tar.bz2
abslibre-8b1e51320c7fdd5729cafa52bcafb1e56eb9086b.zip
java-commons-lang3: add new package to [pcr]
Diffstat (limited to 'pcr/java-commons-lang3')
-rw-r--r--pcr/java-commons-lang3/PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/java-commons-lang3/PKGBUILD b/pcr/java-commons-lang3/PKGBUILD
new file mode 100644
index 000000000..a4cca480b
--- /dev/null
+++ b/pcr/java-commons-lang3/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=commons-lang3
+pkgname=java-${_pkgname}
+pkgver=3.5
+pkgrel=1
+pkgdesc="Implementations of common Lang - version 3"
+arch=('any')
+url="https://commons.apache.org/lang/"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh')
+source=("https://archive.apache.org/dist/commons/lang/source/${_pkgname}-$pkgver-src.tar.gz")
+sha256sums=('759bbde7b5f5ad31fd0afa8ac3148f8f98b8a32372e7ed8b68c61f5b07a37cb1')
+
+prepare() {
+ cd "$srcdir/${_pkgname}-$pkgver-src"
+ mkdir -p build/classes
+}
+
+build() {
+ cd "$srcdir/${_pkgname}-$pkgver-src"
+ javac -d build/classes -encoding UTF8 $(find src/main/java -name \*.java)
+ javadoc -d build/javadoc -encoding UTF8 -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"
+}