blob: 1f745e056eed933fd38aec46ce2c3062ac498c23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
_pkgname=osgi.core
pkgname=osgi-core
pkgver=6.0.0
pkgrel=2
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/org.${_pkgname}/${pkgver}/org.${_pkgname}-${pkgver}-sources.jar"
"https://repo1.maven.org/maven2/org/osgi/org.${_pkgname}/${pkgver}/org.${_pkgname}-${pkgver}.pom")
sha1sums=('347531f45363ed10e222b03231d49bb7df016a4d'
'5a9c1b8324244e2fc7a6b4ef429755d0912acde3')
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} \
"org.${_pkgname}-${pkgver}.pom" \
${_pkgname}.jar \
${_pkgname}-${pkgver}.jar
ln -s "/usr/share/java/${_pkgname}-${pkgver}.jar" \
"${pkgdir}/usr/share/java/${_pkgname}.jar"
}
|