aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-redis/APKBUILD
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 08:09:14 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 08:12:51 +0000
commit102c0ab5962603ad61d1d948745653382f43543d (patch)
tree117264de8929a0f85db96843f150a745e9f37aad /community/lua-redis/APKBUILD
parent92e6b35f7e964221d45c6192dfd2638f1ebb08a5 (diff)
downloadaports-102c0ab5962603ad61d1d948745653382f43543d.tar.bz2
aports-102c0ab5962603ad61d1d948745653382f43543d.tar.xz
community/lua-redis: moved from testing
Diffstat (limited to 'community/lua-redis/APKBUILD')
-rw-r--r--community/lua-redis/APKBUILD64
1 files changed, 64 insertions, 0 deletions
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 <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+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"