aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-mimetypes/APKBUILD
blob: 595c25b23b6b830442ca1c41b4de65fdea736dd1 (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-mimetypes
pkgver=1.0.0
_luaversions="5.1 5.2 5.3"
pkgrel=0
pkgdesc="non-server-bound database of MIME type"
url="https://bitbucket.org/leafstorm/lua-mimetypes"
arch="noarch"
license="custom"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages=""
source="http://dev.alpinelinux.org/archive/lua-mimetypes/lua-mimetypes-$pkgver.tar.bz2"
for _v in $_luaversions; do
        subpackages="$subpackages lua$_v-mimetypes:split_${_v/./_}"
done

_builddir="$srcdir"/leafstorm-lua-mimetypes-02100ff1171e

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="A Lua $_ver non-server-bound database of MIME type"
	install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
	install -Dm644 mimetypes.lua \
		"$subpkgdir"/usr/share/lua/$_ver/mimetypes.lua || return 1
}

for _v in $_luaversions; do
        eval "split_${_v/./_}() { _split $_v; }"
done

md5sums="79fe30b1c58cdb632d6c52aa540374c8  lua-mimetypes-1.0.0.tar.bz2"
sha256sums="5519b1a15f17e92d12b0c615ad312d508a09fe18715ce35d20b701ca6f837564  lua-mimetypes-1.0.0.tar.bz2"
sha512sums="11b26e8e9133979ace0f40000548cec168f9ad9c3c68ac9d8a2a0c92a939a0a0e619e0fac9b2796a4231f1dbd20730a687aaa72d9cd61b0f25c9b06211b209d3  lua-mimetypes-1.0.0.tar.bz2"