aports/main/lua-pty/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

64 lines
1.7 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-pty
_pkgname=lpty
pkgver=1.2.1
_rockver=1
pkgrel=1
pkgdesc="Lua module to control other programs via PTYs."
url="http://www.tset.de/lpty/"
arch="all"
license="MIT"
depends=""
makedepends=""
source="http://www.tset.de/downloads/$_pkgname-$pkgver-$_rockver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver-$_rockver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
prepare() {
default_prepare || return 1
local lver; for lver in $_luaversions; do
cp -r "$builddir" "$builddir-$lver" || return 1
done
}
build() {
local lver; for lver in $_luaversions; do
msg "Building for Lua $lver..."
cd "$builddir-$lver"
make CFLAGS="$CFLAGS -fPIC" \
LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \
LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \
LUA=lua$lver || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-$_rockver"
pkgdesc="$pkgdesc (for Lua $lver)"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
[ "$lver" = 5.1 ] && replaces="$pkgname"
cd "$builddir-$lver"
make INST_DIR="$subpkgdir/usr" LUAVERSION=$lver install
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
md5sums="6eadcd08580d8eb5e60abe7273b74d61 lpty-1.2.1-1.tar.gz"
sha256sums="46bf8142ac06a4ed4ac64036f03af63d69a65d3fc03ce578fbb33d56fd5dfb65 lpty-1.2.1-1.tar.gz"
sha512sums="46ffe9f5d9d70bda453c86965b218be4908a965e915aed5e0f4a788f85a8e67e88c9d5aea960048a584bfab08e02b64edfcfafa463bc3821dce056515380e692 lpty-1.2.1-1.tar.gz"