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

86 lines
3.1 KiB
Plaintext

# Maintainer: Yagnesh Mistry <ysh@live.in>
pkgname=twemproxy
akaname=nutcracker
pkgver=0.4.1
pkgrel=0
pkgdesc="A fast, light-weight proxy for memcached and redis"
url="https://github.com/twitter/twemproxy"
arch="all"
license="Apache-2.0"
depends=""
depends_dev=""
makedepends="automake autoconf libtool yaml-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/twitter/twemproxy/archive/v$pkgver.tar.gz
nutcracker.initd
nutcracker.confd
use-system-libyaml.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
_logdir=/var/log/$akaname
_rundir=/var/run/$akaname
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
autoreconf -vif
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -m644 -D "$srcdir"/$pkgname-$pkgver/conf/nutcracker.yml \
"$pkgdir"/etc/$akaname/nutcracker.yml || return 1
install -m644 -D "$srcdir"/$pkgname-$pkgver/conf/nutcracker.leaf.yml \
"$pkgdir"/etc/$akaname/nutcracker.leaf.yml || return 1
install -m644 -D "$srcdir"/$pkgname-$pkgver/conf/nutcracker.root.yml \
"$pkgdir"/etc/$akaname/nutcracker.root.yml || return 1
install -m755 -D "$srcdir"/$akaname.initd \
"$pkgdir"/etc/init.d/$akaname || return 1
install -m644 -D "$srcdir"/$akaname.confd \
"$pkgdir"/etc/conf.d/$akaname || return 1
install -m0755 -d "$pkgdir"/$_rundir || return 1
install -m0755 -d "$pkgdir"/$_logdir || return 1
_docs="README.md NOTICE ChangeLog"
for _doc in $_docs; do
install -m644 -D "$srcdir"/$pkgname-$pkgver/$_doc \
"$pkgdir"/usr/share/doc/$akaname/$_doc || return 1
done
install -m644 -D "$srcdir"/$pkgname-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$akaname/LICENSE || return 1
}
md5sums="6b27455285f81e4335d00983076cf4b8 twemproxy-0.4.1.tar.gz
531b2ded35c9f9e3c53388ceb9da9e9d nutcracker.initd
5fcf33052bb7ddd286e58fcdef5335db nutcracker.confd
521837066110c2d0248c11620bf66e15 use-system-libyaml.patch"
sha256sums="00c2940f91947bea9457a348316aac1aa1d4e757238aafbefc9d51057da8ede0 twemproxy-0.4.1.tar.gz
f6531c2bbb085e70e4de4b51a01e4b2a6fe6cec41ba4924cc7ac56d51393fdfd nutcracker.initd
ff28c0ffb1aa82e7bcd19c79f76cdb05641b4181f6668349fe9ed87044ce0d3e nutcracker.confd
718fe0cf3a48f51f5b8a2b6ef8120068b1604c7588b33e5db27de8301e77fdf4 use-system-libyaml.patch"
sha512sums="581fae1d12feb983ed25b22cd6f597fd28b7070906ac29d3990669ae5c626a468914021cee152a6a2299a2838c838ad907e4c911b911ef04166ac7bbb2982da1 twemproxy-0.4.1.tar.gz
56bc051eac972cc1e4cfb334673f8e4c8a5f0855fb4f0b66e05a148855dae34870d949a5d19c111d072a0405b2014a334151ad9414a40fdc67e559ff37d68093 nutcracker.initd
e69e6d7b48a360b8b7b7ec7d7d46e2c736c4e30e6d6a22ed5b01d64ccb3ec701537545b2b6e5c1cbf2ba9f657f86e7a94686e3dc8a43dcba9688695717d62f12 nutcracker.confd
beadf407de53378bfe0ee12bbdf2315bde220a322aa13fc1993b487e1503f8825280408c500c902db683ee35b255e304acfe2cb011a6e9ffe02cdbfcfb1d2bf5 use-system-libyaml.patch"