mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
This commit updates $license variable in all APKBUILDs to comply with short names specified by SPDX version 3.0 [1] where possible. It was done using find-and-replace method on substrings inside $license variables. Only license names were updated, not "expressions" specifying relation between the licenses (e.g. "X and Y", "X or Y", "X and (Y or Z)") or exceptions (e.g. "X with exceptions"). Many licenses have a version or multiple variants, e.g. MPL-2.0, BSD-2-Clause, BSD-3-Clause. However, $license in many aports do not contain license version or variant. Since there's no way how to infer this information just from abuild, it were left without the variant suffix or version, i.e. non SPDX compliant. GNU licenses (AGPL, GFDL, GPL, LGPL) are especially complicated. They exist in two variants: -only (formerly e.g. GPL-2.0) and -or-later (formerly e.g. GPL-2.0+). We did not systematically noted distinguish between these variants, so GPL-2.0, GPL2, GPLv2 etc. may mean GPL-2.0-only or GPL-2.0-or-later. Thus GNU licenses without "+" (e.g. GPL2+) were left without the variant suffix, i.e. non SPDX compliant. Note: This commit just fixes format of the license names, no verification has been done if the specified license information is actually correct! [1]: https://spdx.org/licenses/
69 lines
2.0 KiB
Plaintext
69 lines
2.0 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=java-jna
|
|
_pkgname=${pkgname#java-}
|
|
pkgver=4.5.1
|
|
pkgrel=0
|
|
pkgdesc="JNA provides Java programs easy access to native shared libraries."
|
|
url="https://github.com/java-native-access/jna"
|
|
arch="all"
|
|
license="Apache-2.0 LGPL-2.1"
|
|
depends="openjdk8-jre-base"
|
|
makedepends="apache-ant autoconf automake libffi-dev>=3.2 libtool openjdk8"
|
|
subpackages="$pkgname-native"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/java-native-access/$_pkgname/archive/$pkgver.tar.gz
|
|
0001-jar-without-natives.patch
|
|
"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cd "$builddir"
|
|
|
|
# Disable Java AWT support (requires some X libs).
|
|
sed -i -E "s/^(CDEFINES=.*)$/\1 -DNO_JAWT/g" native/Makefile
|
|
|
|
# Remove bundled libffi sources, we're gonna use headers form libffi-dev.
|
|
rm -r native/libffi
|
|
|
|
# Remove some bundled JARs.
|
|
rm -r dist
|
|
find lib/native -name "*.jar" -exec rm {} +
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
ant clean
|
|
|
|
# Parallel build doesn't work here!
|
|
MAKEFLAGS="-j1" \
|
|
ant native -Drelease=true -Ddynlink.native=true \
|
|
&& ant jar -Domit-jnilib=true
|
|
}
|
|
|
|
package() {
|
|
depends="$depends $pkgname-native"
|
|
|
|
install -m644 -D "$builddir"/build/jna.jar \
|
|
"$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar
|
|
ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar
|
|
}
|
|
|
|
native() {
|
|
local soname="libjnidispatch.so"
|
|
|
|
cd "$builddir"
|
|
|
|
local sover="$(sed -En 's/^JNA_JNI_VERSION=([^ ]+).*/\1/p' native/Makefile)"
|
|
[ -n "$sover" ]
|
|
|
|
install -m755 -D build/native-linux-*/$soname \
|
|
"$subpkgdir"/usr/lib/$soname.$sover
|
|
ln -sf $soname.$sover "$subpkgdir"/usr/lib/$soname
|
|
}
|
|
|
|
sha512sums="057e185011dc492fef3e9273f8df8dc9971752337bb39b6fa1d53d305bb2ff52e8408b96bddc288cbbd2ae08c126904fa278276dd79d93801bcac361adda8300 java-jna-4.5.1.tar.gz
|
|
dacfa03e1a957172502dd10007445e844df67288fde07f7ada80a5cbfe3186511aa7a866c8c757a0a94c894829fead9c67ad0993f2105d2fef1f18d22ee01cdb 0001-jar-without-natives.patch"
|