aboutsummaryrefslogtreecommitdiffstats
path: root/main/ninja/APKBUILD
blob: 1671067b2c4bc8d4382f513865cd1f4dd145aef6 (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
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ninja
pkgver=1.8.2
pkgrel=1
pkgdesc="Small build system with a focus on speed"
url="https://ninja-build.org/"
arch="all"
license="Apache-2.0"
makedepends="asciidoctor python3 re2c gtest"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz"
builddir="$srcdir"/${pkgname}-${pkgver}

build() {
	cd "$builddir"
	python3 ./configure.py --bootstrap
	asciidoctor doc/manual.asciidoc
}

check() {
	cd "$builddir"

	./ninja ninja_test
	./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
}

package() {
	cd "$builddir"
	install -m755 -D ninja "$pkgdir/usr/bin/ninja"
	install -m644 -D doc/manual.asciidoc \
		"$pkgdir/usr/share/doc/ninja/manual.asciidoc"
	install -m644 -D doc/manual.html \
		"$pkgdir/usr/share/doc/ninja/manual.html"

	install -m644 -D misc/bash-completion \
		"$pkgdir/usr/share/bash-completion/completions/ninja"
}

sha512sums="1650bf9e3eddeb0b0fbb415c2b8e0a7c094421e991fa8139fd77fae0f6ee7ee980b7cf5e98d883c3a884f99abcb06fa26e3980af3a3a5bb6dd655124755782c2  ninja-1.8.2.tar.gz"