# Maintainer: Natanael Copa _luaversions="5.1 5.2 5.3" pkgname=lua-curl _pkgname=Lua-cURLv3 pkgver=0.3.7 pkgrel=0 pkgdesc="Lua bindings to cURL library" url="https://github.com/Lua-cURL/Lua-cURLv3" arch="all" license="MIT/X11" depends="" makedepends="curl-dev" subpackages="" source="$pkgname-$pkgver.tar.gz::https://github.com/Lua-cURL/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" 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..." cd "$builddir-$lver" echo LUA_IMPL=lua$lver >> .config make LUA_VERSION=$lver || return 1 done } package() { mkdir -p "$pkgdir" } _subpackage() { local lver="${subpkgname:3:3}" pkgdesc="$pkgdesc (for Lua $lver)" depends="lua$lver" install_if="$pkgname=$pkgver-r$pkgrel lua$lver" cd "$builddir-$lver" make install DESTDIR="$subpkgdir" LUA_VERSION=$lver } sha512sums="17807168fe5ff3758f00d2f9138d397ec2ba7eb4d80a36182700c84aaeaf939fc846ec15d98e66bea20e251a0a001962e18d002999db29b378cd820b896aff42 lua-curl-0.3.7.tar.gz"