diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-12 08:15:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-12 08:17:04 +0000 |
commit | 1ad0e70c8c66fc31cd63368b4f9121109fd9736f (patch) | |
tree | dee83a7d93c966e4ded244af42728221aa318564 | |
parent | 4b7c6269acad0758751fd8724ef89c06d16644c6 (diff) | |
download | aports-1ad0e70c8c66fc31cd63368b4f9121109fd9736f.tar.bz2 aports-1ad0e70c8c66fc31cd63368b4f9121109fd9736f.tar.xz |
testing/lua-cqueues: new aport
Lua event loop using coroutines
http://25thandclement.com/~william/projects/cqueues.html
-rw-r--r-- | testing/lua-cqueues/APKBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/lua-cqueues/APKBUILD b/testing/lua-cqueues/APKBUILD new file mode 100644 index 0000000000..c16fbe85f3 --- /dev/null +++ b/testing/lua-cqueues/APKBUILD @@ -0,0 +1,65 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +_luaversions="5.1 5.2" +pkgname=lua-cqueues +pkgver=20140729 +pkgrel=0 +pkgdesc="Lua event loop using coroutines" +url="http://25thandclement.com/~william/projects/cqueues.html" +arch="all" +license="MIT" +depends="" +depends_dev="" +subpackages="" +makedepends="$depends_dev openssl-dev" +install="" +source="http://25thandclement.com/~william/projects/releases/cqueues-$pkgver.tgz" + +for _i in $_luaversions; do + makedepends="$makedepends lua${_i}-dev" + subpackages="$subpackages lua${_i}-cqueues:_split_${_i/./}" + depends="$depends lua${_i}-cqueues" +done + +_builddir="$srcdir"/cqueues-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + make prefix=/usr || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" prefix=/usr install || return 1 + rm -f "$pkgdir"/usr/lib/*.la +} + +_split() { + local d= _ver=$1 + pkgdesc="$pkgdesc - for Lua $_ver" + replaces="$pkgname" + 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="4dae243ba57cbb79628d1c0ff6156635 cqueues-20140729.tgz" +sha256sums="9b21bdc315b95d2b84aa93bbb296a969753400c44deeb2db47abe930359b27c9 cqueues-20140729.tgz" +sha512sums="7a44c5f6eba59e1336096fbf9970c6b0d527abab1a39ede059507c2c65e64a74722d3cb6bca3dc9cce02e7554f5da7d6c06cdf06833b32eca195714fef076b03 cqueues-20140729.tgz" |