summaryrefslogtreecommitdiffstats
path: root/lua-abletonlink/PKGBUILD
blob: 9716b550cce43b2a2153723612e92b2a1cc06cc3 (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
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Sol Bekic <s+aur at s-ol dot nu>

_rockname=abletonlink
pkgbase=lua-$_rockname
pkgname=("lua-$_rockname" "lua54-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=1.1.0
_rockrel=2
pkgrel=1
pkgdesc='Lightweight wrapper of the Ableton Link C API (abl_link)'
arch=(x86_64)
url="https://git.s-ol.nu/lua-abletonlink/-/"
license=(MIT)
depends=()
makedepends=(lua
             lua51
             lua52
             lua53
             luarocks)
source=("git+https://git.s-ol.nu/lua-$_rockname.git#tag=v$pkgver"
        "git+https://github.com/Ableton/link.git#tag=Link-3.1.5"
        "git+https://github.com/chriskohlhoff/asio.git")
sha256sums=('26774a0493820047f1257abe967b05abe344a85ad925c84078d05d1477d34e79'
            'SKIP'
            'SKIP')

prepare() {
  cd "$srcdir/lua-$_rockname"
  git submodule init
  git config submodule.link.url "$srcdir/link"

  cd link
  git submodule init
  git config submodule.modules/asio-standalone.url "$srcdir/asio"

  cd ..
  git -c protocol.file.allow=always submodule update --recursive
}

_package() {
	cd "$srcdir/lua-$_rockname"
	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
		make --deps-mode=none --no-manifest "$_rockname-$pkgver-$_rockrel.rockspec"
}

package_lua-abletonlink() {
	_package 5.5
	depends+=(lua)
}

package_lua51-abletonlink() {
	_package 5.1
	depends+=(lua51)
}

package_lua52-abletonlink() {
	_package 5.2
	depends+=(lua52)
}

package_lua53-abletonlink() {
	_package 5.3
	depends+=(lua53)
}

package_lua54-abletonlink() {
	_package 5.4
	depends+=(lua54)
}