summaryrefslogtreecommitdiff
path: root/pcr/jmdns
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-09 14:51:54 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-09 14:51:54 -0500
commit7384884c390a60cfdf42f309456f2f95a7cea0e7 (patch)
tree4795f63181ad08d9ba23bcb86918db2866228643 /pcr/jmdns
parent06c86621dc5ac7ac6670e3e2e978a30b8d340f48 (diff)
downloadabslibre-7384884c390a60cfdf42f309456f2f95a7cea0e7.tar.gz
abslibre-7384884c390a60cfdf42f309456f2f95a7cea0e7.tar.bz2
abslibre-7384884c390a60cfdf42f309456f2f95a7cea0e7.zip
jmdns: add new package to [pcr]
Diffstat (limited to 'pcr/jmdns')
-rw-r--r--pcr/jmdns/PKGBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/pcr/jmdns/PKGBUILD b/pcr/jmdns/PKGBUILD
new file mode 100644
index 000000000..fad9af807
--- /dev/null
+++ b/pcr/jmdns/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=jmdns
+pkgver=3.5.1
+pkgrel=1
+pkgdesc="Java implementation of multi-cast DNS (Apple Rendezvous)"
+arch=('any')
+url="https://github.com/jmdns/jmdns"
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh' 'slf4j')
+source=("https://github.com/$pkgname/$pkgname/archive/$pkgname-$pkgver.tar.gz")
+sha256sums=('dbb18a5add7e67c804826bd60419ab0d0c2dfd44d3e7a863e2890c9ce1f05c0f')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgname-$pkgver"
+ mkdir -p build/classes
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgname-$pkgver"
+ CLASSPATH="/usr/share/java/slf4j-api.jar"
+ javac -cp $CLASSPATH -d build/classes $(find src/main/java -name \*.java)
+ javadoc -classpath $CLASSPATH -d build/javadoc \
+ -sourcepath src/main/java -subpackages javax
+ jar -cvf "$pkgname.jar" -C build/classes .
+}
+
+package() {
+ cd "$srcdir/$pkgname-$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 "javax.$pkgname" $pkgname $pkgver \
+ pom.xml "$pkgname.jar" "$pkgname-$pkgver.jar"
+
+ ln -s "/usr/share/java/$pkgname-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$pkgname.jar"
+}