aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/lua-date/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/lua-date/APKBUILD')
-rw-r--r--unmaintained/lua-date/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/unmaintained/lua-date/APKBUILD b/unmaintained/lua-date/APKBUILD
new file mode 100644
index 0000000000..bd4e9987ed
--- /dev/null
+++ b/unmaintained/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"