aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gn/APKBUILD
blob: 3dcf40af24a495e2f66ad7b98c948ec137332f8d (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
# Maintainer: Sven Assmann <sven@d34dl0ck.me>
pkgname=gn
pkgver=1530
pkgrel=0
pkgdesc="GN is a meta-build system that generates build files for Ninja."
url="https://gn.googlesource.com/gn/+/1ab6fa2c/README.md"
arch="all !x86 !armhf !armv7"
license="BSD-3-Clause"
depends="libgcc musl"
makedepends="python2 ninja git clang"
giturl="https://gn.googlesource.com/gn"
builddir="$srcdir"

fetch() {
    git clone https://gn.googlesource.com/gn "$builddir/git"
    cd "$builddir/git"
    git reset --hard 1ab6fa2c
}

prepare() {
    "$builddir/git/build/gen.py"
}

check() {
    cd "$builddir/git/out/"

    ./gn_unittests
}

build() {
    cd "$builddir/git"
    ninja -C out -j 8
}

package() {
    install -m755 -D "$builddir/git/out/$pkgname" "$pkgdir/usr/bin/$pkgname"
}