diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-17 08:56:44 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-17 08:56:44 +0000 |
commit | 9c520e9620e5ad155ce70cbca629bb1244c42b17 (patch) | |
tree | ce6f5e94637e35c4308951e40e6f6d16646d9b98 /main/lua-cqueues | |
parent | 2a1b4afbfe99227159d3481b85e8389e402cae25 (diff) | |
download | aports-9c520e9620e5ad155ce70cbca629bb1244c42b17.tar.bz2 aports-9c520e9620e5ad155ce70cbca629bb1244c42b17.tar.xz |
main/lua-cqueues: move from testing
Diffstat (limited to 'main/lua-cqueues')
-rw-r--r-- | main/lua-cqueues/APKBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/main/lua-cqueues/APKBUILD b/main/lua-cqueues/APKBUILD new file mode 100644 index 0000000000..ff792e91c0 --- /dev/null +++ b/main/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 m4" +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" |