diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-29 15:07:15 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-29 15:12:41 +0100 |
commit | 03df0e7645049fa22c67365d9f9f94ba07a38fd9 (patch) | |
tree | ea8ecbfa3517e6baf60a623c687ef8090753d9a6 /main/lua-stdlib-normalize | |
parent | 8fcda6880b4eef6aa7ecab3415d90dd6b2cec071 (diff) | |
download | aports-03df0e7645049fa22c67365d9f9f94ba07a38fd9.tar.bz2 aports-03df0e7645049fa22c67365d9f9f94ba07a38fd9.tar.xz |
main/lua-stdlib-normalize: new aport
This aport is needed for recent version of main/lua-lyaml.
Diffstat (limited to 'main/lua-stdlib-normalize')
-rw-r--r-- | main/lua-stdlib-normalize/APKBUILD | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/main/lua-stdlib-normalize/APKBUILD b/main/lua-stdlib-normalize/APKBUILD new file mode 100644 index 0000000000..0b8edc4d24 --- /dev/null +++ b/main/lua-stdlib-normalize/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-stdlib-normalize +_rockname=std.normalize +pkgver=2.0.1 +pkgrel=0 +pkgdesc="Normalized Lua functions" +url="https://lua-stdlib.github.io/normalize/" +arch="noarch" +license="MIT" +depends="lua" +subpackages="" +options="!check" # FIXME: requires lua-specl that we don't have yet +source="$pkgname-$pkgver.tar.gz::https://github.com/lua-stdlib/normalize/archive/v$pkgver.tar.gz" +builddir="$srcdir/normalize-$pkgver" + +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" +done + +package() { + mkdir -p "$pkgdir" +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc (for Lua $lver)" + depends="lua$lver lua$lver-stdlib-debug" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + + local lmod_dir="$subpkgdir/usr/share/lua/$lver" + local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_rockname/$pkgver-1" + + mkdir -p "$lmod_dir" + cp -r "$builddir"/lib/std "$lmod_dir"/ + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest +} + +sha512sums="a5dd11d65f613c16dfaae59703f1c296a6d74a56e6dfd12c0e288fa60bb0a344474922a0fe298a8a77d1d18672f45d21c12e1b3fb2ef6b306687975de336cb5c lua-stdlib-normalize-2.0.1.tar.gz" |