diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-10-29 21:32:04 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-10-29 21:34:59 +0100 |
commit | 7b3e273c5273caa5ec5de52c94e1724a992054b9 (patch) | |
tree | 6c153b02ecdbbc89c4c46ebc91fe44bb260bbdbf /community/luasrcdiet/APKBUILD | |
parent | c2fc85c203693d141a255af17efc02ed02237811 (diff) | |
download | aports-7b3e273c5273caa5ec5de52c94e1724a992054b9.tar.bz2 aports-7b3e273c5273caa5ec5de52c94e1724a992054b9.tar.xz |
community/lua-srcdiet: rename to luasrcdiet
Diffstat (limited to 'community/luasrcdiet/APKBUILD')
-rw-r--r-- | community/luasrcdiet/APKBUILD | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/community/luasrcdiet/APKBUILD b/community/luasrcdiet/APKBUILD new file mode 100644 index 0000000000..64fdc0f369 --- /dev/null +++ b/community/luasrcdiet/APKBUILD @@ -0,0 +1,44 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=luasrcdiet +pkgver=0.3.0 +pkgrel=1 +pkgdesc="Compresses Lua source code by removing unnecessary characters" +url="https://github.com/jirutka/luasrcdiet" +arch="noarch" +license="MIT" +depends="lua" +replaces="lua-srcdiet" # for backward compatibility +source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" +options="!check" # upstream does not provide tests yet + +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + subpackages="$subpackages lua$_v-$pkgname:_subpackage" +done + +package() { + cd "$builddir" + install -D -m 755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc (for Lua $lver)" + depends="lua$lver ${depends//lua-/lua$lver-}" + replaces="lua$lver-srcdiet" # for backward compatibility + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + local lmod_dir="$subpkgdir/usr/share/lua/$lver" + local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1" + + cd "$builddir" + + mkdir -p "$lmod_dir" + cp -r $pkgname "$lmod_dir"/ + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest +} + +sha512sums="3703c0dbcff7610ab375a41971ab3a7cc3db86b0b49dec52f3f9b6ca7ebea7b84dd144f8dc0b042453f6b1b880b61fe8a756231a1bed3d304fda7d2a831a49ab luasrcdiet-0.3.0.tar.gz" |