aports/main/lua-json4/APKBUILD
Jakub Jirutka 63f5e7d295 [various]: unify names of licenses according to SPDX
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/
2017-12-30 21:05:50 +01:00

50 lines
1.4 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-json4
_name=json4lua
pkgver=1.0.0
pkgrel=2
pkgdesc="JSON encoding / decoding module for Lua (JSON4lua)"
url="https://github.com/craigmj/json4lua"
arch="noarch"
license="GPL-2.0"
depends=""
subpackages=""
for _i in $_luaversions; do
subpackages="$subpackages lua$_i-json4:split_${_i/./_}"
done
source="json4lua_$pkgver.tar.gz::https://github.com/craigmj/json4lua/archive/$pkgver.tar.gz"
_builddir="$srcdir"/json4lua-$pkgver
build() {
# do nothing, but keep it to make abuild happy
:
}
package() {
for _i in $_luaversions; do
install -D "$_builddir"/json/json.lua \
"$pkgdir"/usr/share/lua/$_i/json.lua
done
}
_split() {
local d= _ver=$1
pkgdesc="JSON encoding / decoding module for Lua $_ver (JSON4lua)"
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
for _i in $_luaversions; do
eval "split_${_i/./_}() { _split $_i; }"
done
md5sums="ddb5ddec7f7cd4abc8d074e394572edb json4lua_1.0.0.tar.gz"
sha256sums="e502541a0090875deb834c1195ac08fdfce736473a83102d9ed78f0b6d723e69 json4lua_1.0.0.tar.gz"
sha512sums="b42e0848af5284950327ad6986fb651650f84d8287b0c75084e022f6468019e82e9bbc4ce165089582f06a082972e63fe5b8ba1cf6d040fbfdb704db430f3547 json4lua_1.0.0.tar.gz"