diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2015-03-16 15:50:49 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2015-03-16 15:50:56 +0000 |
commit | 06cf6361611508bc5b7c157c82de835850c50c0a (patch) | |
tree | d990502e052f6c143be7af6aeeefa29dc84ddf67 /testing/lua-redis | |
parent | a92a27d224172ea464b9b52fe1442bee4d6141ea (diff) | |
download | aports-06cf6361611508bc5b7c157c82de835850c50c0a.tar.bz2 aports-06cf6361611508bc5b7c157c82de835850c50c0a.tar.xz |
testing/lua-redis: new aport
Diffstat (limited to 'testing/lua-redis')
-rw-r--r-- | testing/lua-redis/APKBUILD | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/lua-redis/APKBUILD b/testing/lua-redis/APKBUILD new file mode 100644 index 0000000000..eab2e164d5 --- /dev/null +++ b/testing/lua-redis/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: +pkgname=lua-redis +_pkgname=redis-lua +_luaversions="5.1 5.2" +pkgver=2.0.4 +pkgrel=0 +pkgdesc="A Lua client library for the redis key value storage system" +url="https://github.com/nrk/redis-lua" +arch="noarch" +license="CUSTOM" +depends="" +depends_dev="" +makedepends="$depends_dev" +install="" +subpackages="" +for _i in $_luaversions; do + subpackages="$subpackages lua$_i-redis:split_${_i/./_}" +done + +source="https://github.com/nrk/$_pkgname/archive/version-2.0.zip" +_builddir="$srcdir"/$_pkgname-version-2.0 + +prepare() { + cd "$_builddir" + for _i in $_luaversions; do + cp -r "$_builddir" "$srcdir"/build-$_i + done +} + +build() { + return 0 +} + +package() { + cd "$_builddir" + for _i in $_luaversions; do + cd "$srcdir"/build-$_i + local _luadir="$pkgdir"/usr/share/lua/$_i + install -Dm644 src/redis.lua "$_luadir"/redis.lua + done +} + +_split() { + local d= _ver=$1 + pkgdesc="A Lua $_ver client library for the redis key value storage system" + depends="$depends lua$_i-socket" + replaces="$pkgname" + 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="ab472a35cf5caa1957134b097ea01c2b version-2.0.zip" +sha256sums="221d4583307fd0d5635c63f2c8d5d4e90a96ce473d8ae6b27783dceb1066cbd4 version-2.0.zip" +sha512sums="8ba12b03201e9871da2cdf013c6e3d7f65201963f805ac64e8ba4319cc0b188a0d542ef037952a90c1d7950e927c0d7b2904c2eb8f4aa9e7f5d995b94953c979 version-2.0.zip" |