Commit 0ffe23c7 authored by Jakub Jirutka's avatar Jakub Jirutka

main/lua-inspect: install into lua/common, remove subpkgs

parent 676045dc
...@@ -4,40 +4,31 @@ pkgname=lua-inspect ...@@ -4,40 +4,31 @@ pkgname=lua-inspect
_rockname=inspect _rockname=inspect
_pkgname=inspect.lua _pkgname=inspect.lua
pkgver=3.1.1 pkgver=3.1.1
pkgrel=0 pkgrel=1
pkgdesc="Human-readable representation of Lua tables" pkgdesc="Human-readable representation of Lua tables"
url="https://github.com/kikito/inspect.lua" url="https://github.com/kikito/inspect.lua"
arch="noarch" arch="noarch"
license="MIT" license="MIT"
depends="" depends="lua"
makedepends="" provides=""
subpackages="$pkgname-doc" subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/$_pkgname/archive/v$pkgver.tar.gz" source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver" builddir="$srcdir/$_pkgname-$pkgver"
_luaversions="5.1 5.2 5.3" _luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do for _v in $_luaversions; do
subpackages="$subpackages lua$_v-${pkgname#lua-}:_package" provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done done
package() { package() {
cd "$builddir" local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"
install -Dm644 README.md \
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
install -Dm644 MIT-LICENSE.txt \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
_package() { cd "$builddir"
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc (for Lua $lver)"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_rockname/$pkgver-1"
install -Dm644 "$builddir"/inspect.lua \ install -Dm644 "$builddir"/inspect.lua \
"$subpkgdir"/usr/share/lua/$lver/inspect.lua "$pkgdir"/usr/share/lua/common/inspect.lua
install -Dm644 README.md \
"$pkgdir"/usr/share/doc/$pkgname/README.md
mkdir -p "$rockdir" mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment