summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44f6ca4015cd4b4c1f8e165ab483785ee9a50fe1 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>

_rockname=colors
_project=lua-$_rockname
pkgname=("lua-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=8.05.26
_rockrel=0
pkgrel=6
pkgdesc='HSL Color Theory Computation in Lua'
arch=(any)
url="https://github.com/yuri/$_project"
license=(MIT)
makedepends=(lua
             lua53
             lua52
             lua51
             luarocks)
_web='https://web.archive.org/web/20200627071925'
_archive="$_rockname-$pkgver"
_rock="$_archive-$_rockrel.all.rock"
source=("$_web/http://sputnik.freewisdom.org/files/$_archive.tar.gz")
sha256sums=('64ec89fb6938cfdadca5ba1dc9c549dc61c62a585bb8ff5ac593b33b709f814b')

build() {
	cd "$_archive"
	for LUAVER in 5.{1,2,3,4}; do
		luarocks --lua-version "$LUAVER" \
			make --pack-binary-rock --deps-mode none -- rockspec
		install -Dm0644 -t "lua-$LUAVER/" "$_rock"
	done
}

_package() {
	cd "$_archive"
	depends=("${pkgname%-git}")
	luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
		install --deps-mode none --no-manifest -- "lua-$1/$_rock"
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.txt
}

package_lua-colors() {
  _package 5.4
}

package_lua51-colors() {
  _package 5.1
}

package_lua52-colors() {
  _package 5.2
}

package_lua53-colors() {
  _package 5.3
}