diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-21 23:07:16 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-21 23:07:36 +0200 |
commit | 04e061448461cf5cacca2fa39d56db3c93db0619 (patch) | |
tree | 25e8f1e06dc59c5b132298a4bc097e1ec982a187 /community/lua-srcdiet/APKBUILD | |
parent | 972f763dc938930f69eb709ad85ab142bb0a82db (diff) | |
download | aports-04e061448461cf5cacca2fa39d56db3c93db0619.tar.bz2 aports-04e061448461cf5cacca2fa39d56db3c93db0619.tar.xz |
community/lua-srcdiet: move from testing
Diffstat (limited to 'community/lua-srcdiet/APKBUILD')
-rw-r--r-- | community/lua-srcdiet/APKBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/community/lua-srcdiet/APKBUILD b/community/lua-srcdiet/APKBUILD new file mode 100644 index 0000000000..d66f4565fe --- /dev/null +++ b/community/lua-srcdiet/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-srcdiet +_pkgname=luasrcdiet +pkgver=0.3.0 +pkgrel=0 +pkgdesc="Compresses Lua source code by removing unnecessary characters" +url="https://github.com/jirutka/luasrcdiet" +arch="noarch" +license="MIT" +depends="lua" +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#lua-}:_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-}" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + local lmod_dir="$subpkgdir/usr/share/lua/$lver" + + cd "$builddir" + + mkdir -p "$lmod_dir" + cp -r $_pkgname "$lmod_dir"/ +} + +sha512sums="3703c0dbcff7610ab375a41971ab3a7cc3db86b0b49dec52f3f9b6ca7ebea7b84dd144f8dc0b042453f6b1b880b61fe8a756231a1bed3d304fda7d2a831a49ab lua-srcdiet-0.3.0.tar.gz" |