summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 80e31654ae70e18a2999201733877d97586b175b (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
# Maintainer:  Adrián Pérez de Castro <aperez@igalia.com>
# Contributor: Caleb Maclennan <caleb@alerque.com>

pkgname='sile'
pkgdesc='Modern typesetting system inspired by TeX'
pkgver='0.9.4'
_libtexpdf_ver='0cb0c20a3ba40057e6902551300630fed7199bf6'
pkgrel='3'
arch=('i386' 'x86_64')
url='http://www.sile-typesetter.org/'
license=('MIT')
source=("https://github.com/simoncozens/sile/archive/v$pkgver.tar.gz"
	    "https://github.com/simoncozens/libtexpdf/archive/$_libtexpdf_ver.tar.gz")
sha512sums=('3d041f3e014f2d55f878f535d7ffd5b271b5aa2dc5f74e68261f1f1cdbdd18d7901c77a92a7701a91f7eefae71aa550167b441ced740dc4e459d29bcd8cc9e5e'
            'da8a3d663385138fd2ba4306e190ea5294631f622cce4592198d75cd76109a31c2db24ede95e6adad98f29f952d3a1656a46b8ec9448f6146689f1b5763dd004')

depends=('lua-lpeg'
         'lua-expat'
         'lua-filesystem'
         'fontconfig'
         'icu'
         'harfbuzz>=1.2.6')

prepare () {
	cd "$pkgname-$pkgver"
	rm -rf libtexpdf
	cp -a ../libtexpdf-"$_libtexpdf_ver" libtexpdf
	autoreconf --install
	(cd libtexpdf && autoreconf -I m4)
	sed 's/rm -f core/rm -f/' -i configure
}

build () {
	cd "$pkgname-$pkgver"
	./configure --prefix=/usr
	make
}

package () {
	cd "$pkgname-$pkgver"
	make install DESTDIR="$pkgdir/"

	# Documentation and examples
	for file in README.md ROADMAP documentation/sile.pdf ; do
		install -Dm644 "$file" \
			"$pkgdir/usr/share/doc/$pkgname/$file"
	done
	cp -ar examples "$pkgdir/usr/share/doc/$pkgname"

	# License
	install -Dm644 LICENSE \
		"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}