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

pkgname=fontproof
pkgver=2.2.5
pkgrel=1
_rockrel=1
pkgdesc='A font design testing class and CLI tool for SILE'
arch=(any)
url="https://github.com/sile-typesetter/$pkgname"
license=(MIT)
depends=(lua51-cliargs
         luajit
         sile)
makedepends=(luarocks)
_rock="$pkgname-$pkgver-$_rockrel.src.rock"
source=("$url/releases/download/v$pkgver/$_rock"{,.asc})
sha256sums=('5083cd2345d4730dd248984af19de468f3c7e5284a2c99d4d953a57b667242cc'
            'SKIP')
validpgpkeys=('9F377DDB6D3153A48EB3EB1E63CC496475267693') # Caleb Maclennan <caleb@alerque.com> (@alerque)

prepare() {
	local _luaver="$(sile-lua -q <<< 'SILE.lua_version')"
	local _luabin="$(sile-lua -q <<< 'arg[-1]')"
	luarocks --local init
	luarocks config --scope project lua_version "$_luaver"
	luarocks config --scope project variables.LUA "$_luabin"
}

package() {
	luarocks --tree "$pkgdir/usr/" install --deps-mode none --no-manifest -- $_rock
	sed -i -E -e 's#package.c?path="[^"]+"[^;]+;##g' -e "s#$pkgdir##g" "$pkgdir/usr/bin/$pkgname"
	local _licensedir="$pkgdir/usr/share/licenses/$pkgname/"
	install -d "$_licensedir"
	ln -s /usr/lib/luarocks/rocks-5.1/$pkgname/$pkgver-$_rockrel/doc/LICENSE.md "$_licensedir/"
}