aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-date
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-07-23 18:24:14 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-07-23 18:24:14 +0200
commite0faf3637fdb94bd614a07b64d5e4782b17552d0 (patch)
tree8b5a63624cf54d0b338b28a306f7181bfaa61f05 /testing/lua-date
parent3190981203aebc78a00a9a3dbfbd6b253ef26b10 (diff)
downloadaports-e0faf3637fdb94bd614a07b64d5e4782b17552d0.tar.gz
aports-e0faf3637fdb94bd614a07b64d5e4782b17552d0.tar.bz2
aports-e0faf3637fdb94bd614a07b64d5e4782b17552d0.tar.xz
testing/lua-date: new aport
Diffstat (limited to 'testing/lua-date')
-rw-r--r--testing/lua-date/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/lua-date/APKBUILD b/testing/lua-date/APKBUILD
new file mode 100644
index 0000000000..bd4e9987ed
--- /dev/null
+++ b/testing/lua-date/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=lua-date
+pkgver=2.1.1
+_luaversions="5.1 5.2 5.3"
+pkgrel=0
+pkgdesc="Date & Time module for Lua"
+url="http://tieske.github.io/date/"
+arch="noarch"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/Tieske/date/archive/version_$pkgver.tar.gz"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-date:split_${_v/./_}"
+done
+
+_builddir="$srcdir"/date-version_$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"
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_split() {
+ cd "$_builddir"
+ local _ver="$1"
+ pkgdesc="Date & Time module for Lua $_ver"
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+ install -Dm644 date.lua \
+ "$subpkgdir"/usr/share/lua/$_ver/date.lua || return 1
+}
+
+for _v in $_luaversions; do
+ eval "split_${_v/./_}() { _split $_v; }"
+done
+
+md5sums="fbf98dc124b6c2e6600ae8b43a0752f7 lua-date-2.1.1.tar.gz"
+sha256sums="4a27cc920f884b86b90b4c93fd06647743214fedfd27b801dcf597a954eafae5 lua-date-2.1.1.tar.gz"
+sha512sums="aa7726edcebd500a99267b7f380579940c774d4bfcb85de55ad0d31072a7b7e84232b3e30fc1b04f2b0bd03be646a70ce1d86ef746766e23e441ce97932fbc1e lua-date-2.1.1.tar.gz"