aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-copas/APKBUILD
blob: 06f00b611b2cde5bebe5d57b5051373d8da794bd (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-copas
_pkgname=copas
pkgver=2.0.1
_pkgver=${pkgver//./_}
pkgrel=0
pkgdesc="Coroutine Oriented Portable Asynchronous Services for Lua"
url="http://keplerproject.github.io/copas/"
arch="noarch"
license="MIT"
depends=""
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz"
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:_package"
done

package() {
	mkdir -p "$pkgdir"
}

_package() {
	local lver="${subpkgname:3:3}"
	pkgdesc="$pkgdesc $lver"
	depends="lua$lver lua$lver-socket"
	[ "$lver" = 5.1 ] && depends="$depends lua5.1-coxpcall"
	install_if="lua$lver $pkgname=$pkgver-r$pkgrel"

	cd "$builddir"
	make LUA_DIR="$subpkgdir/usr/share/lua/$lver" install || return 1
}

md5sums="4359935d359f8dd2671f72199901f582  lua-copas-2.0.1.tar.gz"
sha256sums="15d8608e5c736dfce6b8c1f5a8ed2f834b227fc4a9a3360edc4b497e12f816fa  lua-copas-2.0.1.tar.gz"
sha512sums="3bc472c056beab4c2cf8c1733ca2b1e7fcce9866b89dc738060263456b6fe7521956cf6ca614276f99fdf42d278422dbbb0ef42f11f211c16632f04cb518ecc5  lua-copas-2.0.1.tar.gz"