archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / lua-cassowary / repos / community-any / PKGBUILD
blob2d95b00b0823cb8fb74ed7e4d16b011ef8647805
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 pkgbase=lua-cassowary
4 _rockname=${pkgbase#lua-}
5 _project=$_rockname.lua
6 pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
7 pkgver=2.3.2
8 _rockrel=1 # upstream rockrel 2 is only needed for installing with Luarocks 2.x
9 pkgrel=1
10 pkgdesc='The cassowary constraint solver'
11 arch=(any)
12 url="https://github.com/sile-typesetter/$_project"
13 license=(MIT)
14 _luadeps=(penlight)
15 makedepends=(lua
16              lua51
17              lua52
18              lua53
19              luarocks)
20 checkdepends=(busted)
21 _archive="$_project-$pkgver"
22 source=("$url/archive/v$pkgver/$_archive.tar.gz")
23 sha256sums=('20fe7309f59004ce59e6c65d69ed9993de907267fd0314fc224f40e017d59798')
25 check() {
26         cd "$_archive"
27         busted
30 _package() {
31         cd "$_archive"
32         depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
33         luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
34                 make --deps-mode=none --no-manifest "rockspecs/$_rockname-$pkgver-$_rockrel.rockspec"
35         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
38 package_lua-cassowary() {
39         _package 5.4
42 package_lua51-cassowary() {
43         _package 5.1
46 package_lua52-cassowary() {
47         _package 5.2
50 package_lua53-cassowary() {
51         _package 5.3