summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa091f6a18025723d5b8e0c388a840efde0f9021 (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
# Maintainer: willemw <willemw12@gmail.com>

pkgname=ngp-git
pkgver=1.3.r201.gc15dc44
pkgrel=1
pkgdesc='Ncurses grep tool'
arch=(x86_64)
url=https://github.com/jonathanklee/ngp
license=(GPL-3.0-or-later)
makedepends=(cmake git libconfig pcre)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
  git -C $pkgname describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  CFLAGS="$CFLAGS -Wno-error=stringop-truncation"

  cmake -B build -S $pkgname -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Wno-dev
  make -C build
}

package() {
  make -C build DESTDIR="$pkgdir/" install
}