Commit 676045dc authored by Jakub Jirutka's avatar Jakub Jirutka

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

parent e8e65cbf
......@@ -4,41 +4,29 @@ pkgname=lua-gversion
_rockname=gversion
_pkgname=gversion.lua
pkgver=0.2.0
pkgrel=1
pkgrel=2
pkgdesc="Lua library for Gentoo-style versioning format"
url="https://github.com/jirutka/gversion.lua"
arch="noarch"
license="MIT"
depends=""
makedepends=""
subpackages=""
depends="lua"
provides=""
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-$_pkgname:_package"
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done
package() {
mkdir -p "$pkgdir"
}
_package() {
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"
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"
install -m 644 -D "$builddir"/src/gversion.lua \
"$subpkgdir"/usr/share/lua/$lver/gversion.lua
"$pkgdir"/usr/share/lua/common/gversion.lua
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
md5sums="c01c9619c3b82d597e3a71093ca1c40c lua-gversion-0.2.0.tar.gz"
sha256sums="27554e3bcef9d1e1af3a423e3d0d220a9cc824bad9d18fc9473d3f24b777fb7e lua-gversion-0.2.0.tar.gz"
sha512sums="1bae8b3d251cdb1ec6b6aab95214b3b456e2fa9b7b0d1c0f3dd7fb6ae1df170f74fb33386362699eb4cb375d4a885c2fb7513d6d084b79bb4947288d14d3643f lua-gversion-0.2.0.tar.gz"
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