summaryrefslogtreecommitdiff
path: root/pcr/osgi-core
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 03:23:41 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 03:23:41 -0500
commit3456f583b3c3b4c4156dede8fdf0a540be14c438 (patch)
treef65a53b5c5ef78ffb1ac0339d3de5ca854c8b4c8 /pcr/osgi-core
parent138cb29b9fd265703fb134ea04d271c7f469e0fa (diff)
downloadabslibre-3456f583b3c3b4c4156dede8fdf0a540be14c438.tar.gz
abslibre-3456f583b3c3b4c4156dede8fdf0a540be14c438.tar.bz2
abslibre-3456f583b3c3b4c4156dede8fdf0a540be14c438.zip
osgi-core: add new package to [pcr]
Diffstat (limited to 'pcr/osgi-core')
-rw-r--r--pcr/osgi-core/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/osgi-core/PKGBUILD b/pcr/osgi-core/PKGBUILD
new file mode 100644
index 000000000..3ec5fb8db
--- /dev/null
+++ b/pcr/osgi-core/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=osgi.core
+pkgname=osgi-core
+pkgver=6.0.0
+pkgrel=1
+pkgdesc="Java OSGi API - Core module"
+arch=('any')
+url='https://www.osgi.org/developer/specifications/'
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh' 'osgi-annotation')
+source=("https://repo1.maven.org/maven2/org/osgi/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}-sources.jar"
+ "https://repo1.maven.org/maven2/org/osgi/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}.pom")
+sha1sums=('921a11d64e9a5e6fb04f99a006a3b4b9773f44b8'
+ 'a3ad88c11f55bb75d04dc15e66c8a7098561ce4a')
+
+prepare() {
+ cd ${srcdir}
+ mkdir -p build/classes
+}
+
+build() {
+ cd ${srcdir}
+ CLASSPATH="/usr/share/java/osgi.annotation.jar"
+ javac -cp $CLASSPATH -d build/classes -encoding UTF-8 \
+ $(find . -name \*.java)
+ javadoc -classpath $CLASSPATH -d "build/javadoc" -encoding UTF-8 \
+ -sourcepath . -subpackages org
+
+ jar -cvf "${_pkgname}.jar" -C build/classes .
+}
+
+package() {
+ cd ${srcdir}
+
+ # 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 org.osgi "org.${_pkgname}" ${pkgver} \
+ pom.xml \
+ ${_pkgname}.jar \
+ ${_pkgname}-${pkgver}.jar
+ ln -s "/usr/share/java/${_pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}.jar"
+}