blob: a9fdd36d839cdef3e80d3dc5ee754e44eca3cd52 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2"
pkgname=lua-curl
pkgver=0.3.0
pkgrel=0
pkgdesc="Lua bindings to cURL library"
url="http://lua-curl.luaforge.net/"
arch="all"
license="MIT/X11"
depends=
makedepends="curl-dev"
install=
subpackages=""
for _i in $_luaversions; do
makedepends="$makedepends lua${_i}-dev"
subpackages="$subpackages lua${_i}-curl:_split${_i/./}"
depends="$depends lua${_i}-curl"
done
source="lua-curl-$pkgver.tar.gz::https://github.com/Lua-cURL/Lua-cURLv3/archive/v$pkgver.tar.gz"
_builddir="$srcdir"/Lua-cURLv3-$pkgver
build() {
cd "$srcdir"
for _i in $_luaversions; do
cp -r "$_builddir" build-$_i || return 1
cd build-$_i
echo LUA_IMPL=lua$_i >> .config
# echo LUA_CMOD=/usr/lib/lua/$_i >> .config
# echo LUA_LMOD=/usr/share/lua/$_i >> .config
make LUA_VERSION=$_i || return 1
cd ..
done
}
package() {
cd "$srcdir"
for _i in $_luaversions; do
(cd "$srcdir"/build-$_i && make install LUA_VERSION=$_i \
DESTDIR="$pkgdir") \
|| return 1
done
}
_split() {
local d= _ver=$1
pkgdesc="$pkgdesc for Lua $_ver"
depends=
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
for _i in $_luaversions; do
eval "_split${_i/./}() { _split $_i; }"
done
md5sums="ac6ae0534d3d5ee1cf9dacb237f76016 lua-curl-0.3.0.tar.gz"
sha256sums="2d92301f31a700927a7099be089f4161b8f540a1c36fd40fc550f72da572e5e7 lua-curl-0.3.0.tar.gz"
sha512sums="69c697f39129e57328b2fd65dc6e5ad82f8dbb5757dd40466970693f882f0f99d87e30de6b48eb8c0eeb30564d6e7de1f81359269567910c8d3c6fc0e714f97f lua-curl-0.3.0.tar.gz"
|