summaryrefslogtreecommitdiffstats
path: root/lua-alive/PKGBUILD
blob: 39044c79d1eff87e405ae5a8199249849391827a (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
# Maintainer: Sol Bekic <s+aur at s-ol dot nu>

_rockname=alive
pkgbase=lua-$_rockname
pkgname=("lua-$_rockname" "lua54-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=0.2
_rockrel=1
pkgrel=1
pkgdesc='Open Sound Control (OSC) for lua/luajit'
arch=(any)
url="https://github.com/davidgranstrom/losc"
license=(MIT)
makedepends=(lua
             lua51
             lua52
             lua53
             lua54
             luarocks)
source=("git+https://git.s-ol.nu/alive.git#tag=v$pkgver")
sha256sums=('624a42159d229c1da7e9ed98cfd1195354a57b37bc259bea04aa9b43f6ab1aa5')

_package() {
	cd "alive"
	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
		make --deps-mode=none --no-manifest "dist/rocks/$_rockname-$pkgver-$_rockrel.rockspec"
	if [[ $pkgname != lua-$_rockname ]]; then
		rm -rf "$pkgdir/usr/bin"
	else
		find "$pkgdir/usr/bin" -type f -execdir sed -i -e "s#$pkgdir##g" {} \;
	fi
}

package_lua-alive() {
	_package 5.5
	depends=(lua)
}

package_lua51-alive() {
	_package 5.1
	depends=(lua51)
}

package_lua52-alive() {
	_package 5.2
	depends=(lua52)
}

package_lua53-alive() {
	_package 5.3
	depends=(lua53)
}

package_lua54-alive() {
	_package 5.4
	depends=(lua54)
}