: nply/foundationpkgs

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 
pkgname=saait
pkgver=0.8
pkgrel=2
deb_pkgver=$pkgver
deb_depends="libc6"
pkgdesc="The most boring static HTML page generator"
url="https://codemadness.org/saait.html"
arch="all"
license="ISC"
makedepends="build-essentials-stub"
source="https://codemadness.org/releases/$pkgname/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
sha256sums="ba562912b7f3a52884d292b20eba04771995413e7015d3454f905ff3c0210404  saait-0.8.tar.gz"

build() {
	make
	# The legacy tar.gz builder does not call check().
	check
}

check() {
	mkdir -p output
	./saait pages/*.cfg
	test -s output/index.html
	test -s output/example.html
	grep -q 'Example page' output/example.html
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr MANPREFIX=/usr/share/man install
	mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
	install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}