summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 03:15:33 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-06-24 03:15:33 -0500
commit138cb29b9fd265703fb134ea04d271c7f469e0fa (patch)
treeb3e33a4509343c4a58d11933604953bbe099c36d /pcr
parent2fd632d99674760d073c803af4c330a8e71fa15e (diff)
osgi-annotation: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/osgi-annotation/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/pcr/osgi-annotation/PKGBUILD b/pcr/osgi-annotation/PKGBUILD
new file mode 100644
index 000000000..9964a9b36
--- /dev/null
+++ b/pcr/osgi-annotation/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=osgi.annotation
+pkgname=osgi-annotation
+pkgver=6.0.0
+pkgrel=1
+pkgdesc="Java OSGi API - annotation module"
+arch=('any')
+url='https://www.osgi.org/developer/specifications/'
+license=('APACHE')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh')
+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=('09b256fd1357d5f8cb85e35f6c9ef460ce42cb16'
+ '5b1839a024e1cfb735235c649236bbaf9b525b4d')
+
+prepare() {
+ cd ${srcdir}
+ mkdir -p build/classes
+}
+
+build() {
+ cd ${srcdir}
+ javac -d build/classes -encoding UTF-8 \
+ $(find . -name \*.java)
+ javadoc -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"
+}