summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6871e2ce994a6ace834b415a84909a4778d8e30 (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
# $Id$
# Maintainer: Pablo Hernandez <pablo.hernandez.cerdan AT outlook.com>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Filip Brcic <brcha@gna.org>
# Contributor: Mika Fischer <mika.fischer@zoopnet.de>
# Contributor: Gergely Imreh <imrehgATgmailDOTcom>

pkgname=ninja-kitware
pkgver=1.9.0
pkgrel=3
pkgdesc='Small build system with a focus on speed - Kitware version with JobServer and Fortran compatibility'
arch=(x86_64)
url='https://github.com/Kitware/ninja'
provides=(ninja)
conflicts=(ninja)
license=(Apache)
depends=(gcc-libs)
makedepends=(python2 re2c)
optdepends=(emacs)
version_id=g99df1
source=(ninja-$pkgver.$version_id.kitware.dyndep-1.jobserver-1.zip::https://github.com/Kitware/ninja/archive/v$pkgver.$version_id.kitware.dyndep-1.jobserver-1.zip)
md5sums=('6579f06c33fe0eed8d1f5fc11c446f57')
build() {
  cd ninja-$pkgver.$version_id.kitware.dyndep-1.jobserver-1

  python2 configure.py --bootstrap
  if [ -x "$(command -v emacs)" ]; then
    emacs -Q --batch -f batch-byte-compile misc/ninja-mode.el
  fi
}

check() {
  cd ninja-$pkgver.$version_id.kitware.dyndep-1.jobserver-1

  python2 ./configure.py
  ./ninja ninja_test
  ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
}

package() {
  cd ninja-$pkgver.$version_id.kitware.dyndep-1.jobserver-1

  install -m755 -D ninja "$pkgdir/usr/bin/ninja"
  install -m644 -D doc/manual.asciidoc "$pkgdir/usr/share/doc/ninja/manual.asciidoc"
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/ninja/COPYING"

  if [ -x "$(command -v emacs)" ]; then
    install -m644 -D misc/ninja-mode.el "$pkgdir/usr/share/emacs/site-lisp/ninja-mode.el"
    install -m644 -D misc/ninja-mode.elc "$pkgdir/usr/share/emacs/site-lisp/ninja-mode.elc"
  fi
  install -m644 -D misc/ninja.vim "$pkgdir/usr/share/vim/vimfiles/syntax/ninja.vim"

  install -m644 -D misc/bash-completion "$pkgdir/usr/share/bash-completion/completions/ninja"
  install -m644 -D misc/zsh-completion "$pkgdir/usr/share/zsh/site-functions/_ninja"
}