blob: 6f258ab387354e867049de11a4556307c0b537d7 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-mpack
_pkgname=libmpack
pkgver=1.0.4
pkgrel=2
pkgdesc="Libmpack bindings for Lua"
url="https://github.com/tarruda/libmpack"
arch="all"
license="MIT"
depends=""
makedepends=""
checkdepends="lua-busted"
subpackages=""
source="$_pkgname-$pkgver.tar.gz::https://github.com/tarruda/$_pkgname/archive/$pkgver.tar.gz
skip-memleak-test.patch
dont-install-busted.patch"
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#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"/binding/lua \
CFLAGS="$CFLAGS" \
USE_SYSTEM_LUA=yes \
LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \
LUA_LIB="$(pkg-config --libs lua$lver)" || return 1
done
}
check() {
local lver; for lver in $_luaversions; do
msg "Testing on Lua $lver..."
make -C "$builddir-$lver"/binding/lua \
USE_SYSTEM_LUA=yes \
LUA=/usr/bin/lua$lver \
BUSTED=/usr/bin/busted-$lver \
test || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
make -C "$builddir-$lver"/binding/lua \
USE_SYSTEM_LUA=yes \
LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \
DESTDIR="$subpkgdir" \
install
}
sha512sums="8e40a562faf8b62137dec0733cbb9006fa7054e5a47bdd128fb4dfd676fac4e4385a23c3d908a4ce2edd65d673db25916695fa74bc08c5316b0c80e571a7442c libmpack-1.0.4.tar.gz
380603230e65b8b4adec0153aa23089612f0923666b44ca503a4217c1125c5f8cbac9eb550a94add8fa2d5ac40464689302c8e79e5a087f408707ae21eb9faa9 skip-memleak-test.patch
a02076a3a5a98846ae5086f99b33655a7276087dc3ad0e0a64d742b1ca2de302a71ff173a555b9b33ac59f0d2837e5fdf64a3cccbe09791643d32b729bc04bee dont-install-busted.patch"
|