summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c8e6e1cdfa3ac26fbc5059b7ac264e3d796cee1f (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Christian Krause ("wookietreiber") <christian.krause@mailbox.org>

pkgbase=lua-posix
_rockname=${pkgbase#lua-}
_pkgbase="${pkgbase//-}"
pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
pkgver=35.1
_rockrel=1
pkgrel=3
pkgdesc='POSIX bindings for Lua'
arch=(x86_64 i686)
url="https://github.com/$_pkgbase/$_pkgbase"
license=(MIT)
depends=(libxcrypt
         libcrypt.so)
_luadeps=(std-normalize)
makedepends=(lua
             lua51
             lua52
             lua53
             luarocks)
_archive="$_pkgbase-$pkgver"
source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('1b5c48d2abd59de0738d1fc1e6204e44979ad2a1a26e8e22a2d6215dd502c797')

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

package_lua-posix() {
	depends+=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
	_package 5.4
}

package_lua51-posix() {
	depends+=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
	_package 5.1
}

package_lua52-posix() {
	depends+=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
	_package 5.2
}

package_lua53-posix() {
	depends+=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
	_package 5.3
}