aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-linotify/APKBUILD
blob: d2bcf337c4f968511d887f6041136cf398011200 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=lua-linotify
pkgver=0.5
pkgrel=1
pkgdesc="Inotify bindings for Lua"
url="https://github.com/hoelzro/linotify"
arch="all"
license="MIT"
source="linotify-$pkgver.tar.gz::https://github.com/hoelzro/linotify/archive/$pkgver.tar.gz
	makefile.patch
	"
builddir="$srcdir/linotify-$pkgver"

_luaversions="5.1 5.2 5.3 5.4"
for _v in $_luaversions; do
	makedepends="$makedepends lua$_v-dev"
	subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done

prepare() {
	default_prepare

	local lver; for lver in $_luaversions; do
		cp -r "$builddir" "$builddir-$lver"
	done
}

build()	{
	local lver; for lver in $_luaversions; do
		msg "Building for Lua $lver..."
		make LUAVER=$lver -C "$builddir-$lver"
	done
}

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

_subpackage() {
	local lver="${subpkgname:3:3}"
	pkgdesc="$pkgdesc (for Lua $lver)"
	depends="lua$lver"
	install_if="$pkgname=$pkgver-r$pkgrel lua$lver"

	cd "$builddir-$lver"
	make LUAVER=$lver PREFIX="/usr" DESTDIR="$subpkgdir" install
}

sha512sums="08901e7b7954a3a57674dda633da7da5b11f9760dd13953e195d0d79974f3512182830065c321e5d0eac4ac00d1bbf9702eb34f929dbd15c085e5808f4c28ab5  linotify-0.5.tar.gz
5cfdeb71bb2a653d985400e6d150c6d144f108fe320247fbf4aa9f757a1aeabb1cb768d4c20a475fe7e7c564d278058b4a8e7e51fb779d6bc350cefcf0b83935  makefile.patch"