diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-16 21:08:48 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-16 21:10:00 +0200 |
commit | 66573786035dbcffd144dcbc503943b7ee23c821 (patch) | |
tree | 6c9adb61bf4b5b8bfa41082542cc7fb3c88225cb /main | |
parent | 0ffe23c7d5359027eae0d072a4e0b48ba41ba27e (diff) | |
download | aports-66573786035dbcffd144dcbc503943b7ee23c821.tar.bz2 aports-66573786035dbcffd144dcbc503943b7ee23c821.tar.xz |
main/lua-json4: install into lua/common, remove subpkgs, add rock_manifest
Diffstat (limited to 'main')
-rw-r--r-- | main/lua-json4/APKBUILD | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/main/lua-json4/APKBUILD b/main/lua-json4/APKBUILD index fca92c35ce..85b3e2ef90 100644 --- a/main/lua-json4/APKBUILD +++ b/main/lua-json4/APKBUILD @@ -1,49 +1,31 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> -_luaversions="5.1 5.2 5.3" pkgname=lua-json4 -_name=json4lua +_rockname=json4lua pkgver=1.0.0 -pkgrel=2 +pkgrel=3 pkgdesc="JSON encoding / decoding module for Lua (JSON4lua)" url="https://github.com/craigmj/json4lua" arch="noarch" license="GPL-2.0" -depends="" -subpackages="" -for _i in $_luaversions; do - subpackages="$subpackages lua$_i-json4:split_${_i/./_}" -done -source="json4lua_$pkgver.tar.gz::https://github.com/craigmj/json4lua/archive/$pkgver.tar.gz" +depends="lua" +provides="" +source="$pkgname-$pkgver.tar.gz::https://github.com/craigmj/$_rockname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_rockname-$pkgver" -_builddir="$srcdir"/json4lua-$pkgver -build() { - # do nothing, but keep it to make abuild happy - : -} +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility +done package() { - for _i in $_luaversions; do - install -D "$_builddir"/json/json.lua \ - "$pkgdir"/usr/share/lua/$_i/json.lua - done -} + local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1" -_split() { - local d= _ver=$1 - pkgdesc="JSON encoding / decoding module for Lua $_ver (JSON4lua)" - install_if="lua$_ver $pkgname=$pkgver-r$pkgrel" - for d in usr/lib/lua usr/share/lua; do - if [ -d "$pkgdir"/$d/$_ver ]; then - mkdir -p "$subpkgdir"/$d - mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1 - fi - done -} + cd "$builddir" -for _i in $_luaversions; do - eval "split_${_i/./_}() { _split $_i; }" -done + install -D -m 644 json/json.lua "$pkgdir"/usr/share/lua/common/json.lua + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest +} -md5sums="ddb5ddec7f7cd4abc8d074e394572edb json4lua_1.0.0.tar.gz" -sha256sums="e502541a0090875deb834c1195ac08fdfce736473a83102d9ed78f0b6d723e69 json4lua_1.0.0.tar.gz" -sha512sums="b42e0848af5284950327ad6986fb651650f84d8287b0c75084e022f6468019e82e9bbc4ce165089582f06a082972e63fe5b8ba1cf6d040fbfdb704db430f3547 json4lua_1.0.0.tar.gz" +sha512sums="b42e0848af5284950327ad6986fb651650f84d8287b0c75084e022f6468019e82e9bbc4ce165089582f06a082972e63fe5b8ba1cf6d040fbfdb704db430f3547 lua-json4-1.0.0.tar.gz" |