summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9f1d4875ac14f7fb0ec60c601d802fa5a0a3576 (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
# Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Anatol Pomozov <anatol.pomozov gmail>
# Contributor: RunningDroid <runningdroid AT zoho.com>
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>

pkgname=gflags-static
_pkgname=gflags
pkgver=2.2.2
pkgrel=1
pkgdesc='C++ Library for commandline flag processing'
arch=('x86_64')
url='https://github.com/schuhschuh/gflags'
license=('BSD')
depends=('gcc-libs')
makedepends=('cmake')
options=('staticlibs')
provides=('gflags')
conflicts=('gflags')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/schuhschuh/gflags/archive/v${pkgver}.tar.gz")
sha512sums=('98c4703aab24e81fe551f7831ab797fb73d0f7dfc516addb34b9ff6d0914e5fd398207889b1ae555bac039537b1d4677067dae403b64903577078d99c1bdb447')

build() {
  cd "gflags-${pkgver}"
  cmake . \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DREGISTER_INSTALL_PREFIX=OFF \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_STATIC_LIBS=ON \
    -DBUILD_TESTING=ON \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC"
  make
}

check() {
  cd "gflags-${pkgver}"
  make test
}

package() {
  cd "gflags-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING.txt "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING.txt
}