aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-middleclass/APKBUILD
blob: 44046a29dc027340e4c72b4a1452cd01023c56cb (plain) (blame)
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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=lua-middleclass
pkgver=4.1.1
pkgrel=1
_luaversions="5.1 5.2 5.3 5.4"
pkgdesc="Object-orientation for Lua"
url="https://github.com/kikito/middleclass"
arch="noarch"
license="MIT"
makedepends="$depends_dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/kikito/middleclass/archive/v$pkgver.tar.gz"
builddir="$srcdir/middleclass-$pkgver"

for _v in $_luaversions; do
	subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
	eval "split_${_v/./_}() { _split $_v; }"
done

package() {
	mkdir -p "$pkgdir"
}

_split() {
	cd "$builddir"
	local _ver="$1"
	install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
	pkgdesc="Object-orientation for Lua $_ver"
	install -Dm644 middleclass.lua \
		"$subpkgdir/usr/share/lua/$_ver/middleclass.lua"
}

sha512sums="d408435752adf4309a444e1d573ece1d8c79f20dde91f01d7724399079f19a4bfb99083d8cdc70eeb3c1aa21971c272df88cd4c2cce0eb942857de42e4a887e3  lua-middleclass-4.1.1.tar.gz"