aboutsummaryrefslogtreecommitdiffstats
path: root/main/ninja/APKBUILD
blob: d71952aa96580cb055b97d9d3c8350f0cace5870 (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
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ninja
pkgver=1.9.0
pkgrel=0
pkgdesc="Small build system with a focus on speed"
url="https://ninja-build.org/"
arch="all"
license="Apache-2.0"
checkdepends="gtest"
makedepends="asciidoctor python3 re2c"
subpackages="$pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz
	fix-musl.patch
	"
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="a8b5ad00b60bddbdb8439a6092c91a65d093f9bcd6241f69088eb35bea2847efe673c3107a130dc754c747c7712b839d8f88e88d8389520cf7143668ee053feb  ninja-1.9.0.tar.gz
09159f24a0446eff7e1d0b306911fd1a1e96257f02a32d6b241c5d60e3350126a7859f0edf0a2f858214c5c5af23f886289ce2e9c77f0e8e2257fab931933de2  fix-musl.patch"