summaryrefslogtreecommitdiff
path: root/pcr/osgi-compendium/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 08:56:29 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 08:56:29 -0500
commitc6e3d601d4fad0183a51cd8c8851235df7f03c96 (patch)
tree792963d1f1637032a0597027c993ee119996874a /pcr/osgi-compendium/PKGBUILD
parent7731a6dde035662e60127177a12b5f7f79d3ab58 (diff)
downloadabslibre-c6e3d601d4fad0183a51cd8c8851235df7f03c96.tar.gz
abslibre-c6e3d601d4fad0183a51cd8c8851235df7f03c96.tar.bz2
abslibre-c6e3d601d4fad0183a51cd8c8851235df7f03c96.zip
osgi-compendium: add new package to [pcr]
Diffstat (limited to 'pcr/osgi-compendium/PKGBUILD')
-rw-r--r--pcr/osgi-compendium/PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/pcr/osgi-compendium/PKGBUILD b/pcr/osgi-compendium/PKGBUILD
new file mode 100644
index 000000000..aaff37af7
--- /dev/null
+++ b/pcr/osgi-compendium/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=osgi.compendium
+pkgname=osgi-compendium
+pkgver=5.0.0
+pkgrel=1
+pkgdesc="Java OSGi API - Compendium module"
+arch=('any')
+url='https://www.osgi.org/developer/specifications/'
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-geronimo-jpa' 'java-environment' 'jh' 'osgi-core' 'osgi-foundation-ee' 'tomcat8')
+source=("https://repo1.maven.org/maven2/org/osgi/org.${_pkgname}/${pkgver}/org.${_pkgname}-${pkgver}-sources.jar"
+ "https://repo1.maven.org/maven2/org/osgi/org.${_pkgname}/${pkgver}/org.${_pkgname}-${pkgver}.pom"
+ 'LICENSE.txt')
+sha1sums=('3f5760f4c64374f86e4071adae75e0db055eec84'
+ '8d87c0739cfd003228420f1ab5300bd07bb26f0f'
+ '5a7d7df655ba40478fae80a6abafc6afc36f9b6a')
+
+prepare() {
+ cd ${srcdir}
+ mkdir -p build/classes
+}
+
+build() {
+ cd ${srcdir}
+ CLASSPATH="/usr/share/java/ee.foundation.jar:/usr/share/java/geronimo-jpa_2.0_spec.jar"
+ CLASSPATH="$CLASSPATH:/usr/share/java/osgi.core.jar:/usr/share/java/tomcat8/servlet-api.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.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.osgi "org.${_pkgname}" ${pkgver} \
+ "org.${_pkgname}-${pkgver}.pom" \
+ "${_pkgname}.jar" \
+ "${_pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${_pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${_pkgname}.jar"
+}