summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b844da6d106dd4b109b75379d3281ddffc3463f6 (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
# Maintainer: Leonard Iklé <leonard.ikle@gmail.com>

pkgname=cargs
pkgver=1.2.0
pkgrel=1
pkgdesc="A lightweight cross-platform getopt alternative that works on Linux, Windows and macOS. Command line argument parser library for C/C++. Can be used to parse argv and argc parameters."
arch=('x86_64')
url="https://likle.github.io/cargs/"
license=('MIT')
makedepends=('cmake')
source=("https://github.com/likle/cargs/archive/refs/tags/v$pkgver.tar.gz")
md5sums=('18f8df23cd38b4d7f8504f4b29eebfe2')

build() {
  cmake -S "$pkgname-$pkgver" -B build \
    -DCMAKE_BUILD_TYPE="None" \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DBUILD_SHARED_LIBS="1" \
    -DENABLE_TESTS="1" \
    -Wno-dev
  cmake --build build
}

check() {
	cd build
	./cargstest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}