Commit e692eeab authored by Jakub Jirutka's avatar Jakub Jirutka

main/lua-lub: install into lua-common, remove subpackages

parent a6474033
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-lub
_pkgname=lub
_rockname=lub
pkgver=1.1.0
pkgrel=2
pkgdesc="Lubyk base module for Lua"
url="http://doc.lubyk.org/lub.html"
arch="noarch"
license="MIT"
depends="lua-filesystem"
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/lubyk/$_pkgname/archive/REL-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-REL-$pkgver"
depends="lua lua-filesystem"
provides=""
source="$pkgname-$pkgver.tar.gz::https://github.com/lubyk/$_rockname/archive/REL-$pkgver.tar.gz"
builddir="$srcdir/$_rockname-REL-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-$_pkgname:_subpackage"
for _v in 5.1 5.2 5.3; do
provides="$provides lua$_v-$_rockname=$pkgver-r$pkgrel"
done
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
depends="lua$lver ${depends//lua-/lua$lver-}"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1"
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-2"
mkdir -p "$subpkgdir"/usr/share/lua/$lver
cp -r "$builddir"/lub "$subpkgdir"/usr/share/lua/$lver/
mkdir -p "$pkgdir"/usr/share/lua/common
cp -r "$builddir"/lub "$pkgdir"/usr/share/lua/common/
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
md5sums="093cbf163ef2fea60031aea2619ae4b9 lua-lub-1.1.0.tar.gz"
sha256sums="355f427f28155c4cf3a9673aa24c3754ea782c1c5f2081cbc4c28c00ed69a0b7 lua-lub-1.1.0.tar.gz"
sha512sums="46f18cfc12d919694ddba7ab875e579381cd964c18b91dfb46d4f8091b90fd7daef96eaf0e16bd4fb3e01962adb74eeed47259aac014ebf24f85955d99a873f3 lua-lub-1.1.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