aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/lua-date/APKBUILD
blob: bd4e9987ed3452fc2c69f21604b79ffc4f6d8aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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"