aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-cloud_storage/APKBUILD
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-07-23 18:36:30 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-07-23 18:36:30 +0200
commite4242db5755f50447c00ddf9c22c33a6f714f38e (patch)
treeffd8cd62f50db68aa28e1f36d213a3ed0af33fbc /testing/lua-cloud_storage/APKBUILD
parente0faf3637fdb94bd614a07b64d5e4782b17552d0 (diff)
downloadaports-e4242db5755f50447c00ddf9c22c33a6f714f38e.tar.bz2
aports-e4242db5755f50447c00ddf9c22c33a6f714f38e.tar.xz
testing/lua-cloud_storage: new aport
Diffstat (limited to 'testing/lua-cloud_storage/APKBUILD')
-rw-r--r--testing/lua-cloud_storage/APKBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/lua-cloud_storage/APKBUILD b/testing/lua-cloud_storage/APKBUILD
new file mode 100644
index 0000000000..1f3f89af56
--- /dev/null
+++ b/testing/lua-cloud_storage/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=lua-cloud_storage
+pkgver=0.1.0
+_luaversions="5.1 5.2 5.3"
+pkgrel=0
+pkgdesc="A Lua library for communicating with Google Cloud Storage"
+url="https://github.com/leafo/cloud_storage"
+arch="noarch"
+license="MIT"
+depends="lua-socket "
+depends_dev=""
+makedepends="$depends_dev lua-moonscript"
+install=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/leafo/cloud_storage/archive/v$pkgver.tar.gz"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-cloud_storage:split_${_v/./_}"
+done
+
+_builddir="$srcdir"/cloud_storage-$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 || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_split() {
+ cd "$_builddir"
+ local _ver="$1"
+ pkgdesc="A Lua $_ver library for communicating with Google Cloud Storage"
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+ depends="lua${_ver}-socket lua${_ver}-cjson lua${_ver}-mimetypes
+ lua${_ver}-crypto lua${_ver}-expat lua${_ver}-date"
+ mkdir -p "$subpkgdir"/usr/share/lua/$_ver
+ cp cloud_storage/*.lua \
+ "$subpkgdir"/usr/share/lua/$_ver/ || return 1
+}
+
+for _v in $_luaversions; do
+ eval "split_${_v/./_}() { _split $_v; }"
+done
+
+md5sums="dae6fcd15554368f3b9fcc8d9be40542 lua-cloud_storage-0.1.0.tar.gz"
+sha256sums="58eb6c8767daa07c05accf0a0624fa4ef5574865cfac631dff9768ec2dfdea29 lua-cloud_storage-0.1.0.tar.gz"
+sha512sums="d1fe7811469cc2dce11319692500c1d3d78b39a8e3c6ad9513a1ad694c080ee8fc1872c76c08cdc3d777098407ad46574c18de95eb453d3333394b24c727e0ad lua-cloud_storage-0.1.0.tar.gz"