blob: 7901d6c7fe11c883b02968fb60f398658f5dce41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-term
pkgver=0.07
_rockver=0.7-1
pkgrel=1
pkgdesc="Terminal operations for Lua"
url="https://github.com/hoelzro/lua-term"
arch="all"
license="MIT"
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/hoelzro/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # upstream does not provide tests
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
prepare() {
default_prepare || return 1
local lver; for lver in $_luaversions; do
cp -r "$builddir" "$builddir-$lver" || return 1
done
}
build() {
local lver; for lver in $_luaversions; do
msg "Building for Lua $lver..."
make -C "$builddir-$lver" LUA_VER=$lver CFLAGS="$CFLAGS" || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$_rockver"
cd "$builddir-$lver"
make LUA_VER=$lver LUA_DIR="$subpkgdir/usr" install
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="2046ba1861ff590c191bb651941c45eb8b6e9a1252b05e78daaeb31837ce1fc7da9ba124aec34dc7842fd304e945754c463ffd75941125ff952e911ba66efa31 lua-term-0.07.tar.gz"
|