blob: 2fba8a602f6a8ce3b117edeb2b5c736ad5c0cfb0 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ninja
pkgver=1.9.0
pkgrel=3
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
$pkgname-bash-completion:bashcomp:noarch
$pkgname-zsh-completion:zshcomp:noarch
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz
fix-musl.patch
"
_py3_sitelib() {
python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))'
}
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/ninja_syntax.py \
"${pkgdir}$(_py3_sitelib)/ninja_syntax.py"
}
bashcomp() {
depends=""
pkgdesc="Bash completions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
install -m644 -D "$builddir"/misc/bash-completion \
"$subpkgdir"/usr/share/bash-completion/completions/ninja
}
zshcomp() {
depends=""
pkgdesc="Zsh compltions for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel zsh"
install -Dm644 "$builddir"/misc/zsh-completion \
"$subpkgdir"/usr/share/zsh/site-functions/_ninja
}
sha512sums="a8b5ad00b60bddbdb8439a6092c91a65d093f9bcd6241f69088eb35bea2847efe673c3107a130dc754c747c7712b839d8f88e88d8389520cf7143668ee053feb ninja-1.9.0.tar.gz
09159f24a0446eff7e1d0b306911fd1a1e96257f02a32d6b241c5d60e3350126a7859f0edf0a2f858214c5c5af23f886289ce2e9c77f0e8e2257fab931933de2 fix-musl.patch"
|