summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf1e7f4ba37a699fbef1eb116c1a86c4e304ab79 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=gflags-git
pkgver=2.2.2.r40.ga386bd0
pkgrel=1
pkgdesc="C++ Library for commandline flag processing"
arch=('i686' 'x86_64')
url="https://github.com/gflags/gflags"
license=('BSD')
depends=('glibc')
makedepends=('git' 'cmake')
provides=('gflags')
conflicts=('gflags')
options=('staticlibs')
source=("git+https://github.com/gflags/gflags.git")
sha256sums=('SKIP')


pkgver() {
  cd "gflags"

  git describe --long --tags | sed 's/^[A-Za-z]*//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "gflags"

  cmake \
    -B "_build" \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DREGISTER_INSTALL_PREFIX=OFF \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_STATIC_LIBS=ON \
    -DBUILD_TESTING=ON \
    ./
  make -C "_build"
}

check() {
  cd "gflags"

  make -C "_build" test
}

package() {
  cd "gflags"

  make -C "_build" DESTDIR="$pkgdir" install
  install -D -m644 "COPYING.txt" -t "$pkgdir/usr/share/licenses/gflags"
}