From 102c0ab5962603ad61d1d948745653382f43543d Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Mon, 22 Aug 2016 08:09:14 +0000 Subject: community/lua-redis: moved from testing --- community/lua-redis/APKBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 community/lua-redis/APKBUILD (limited to 'community/lua-redis/APKBUILD') diff --git a/community/lua-redis/APKBUILD b/community/lua-redis/APKBUILD new file mode 100644 index 0000000000..8e651c3e38 --- /dev/null +++ b/community/lua-redis/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Francesco Colista +# Maintainer: Francesco Colista +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 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +_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" -- cgit v1.2.3