archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / cxxopts / trunk / PKGBUILD
blobb871c328540e197c6dd4e47843226416597b1f19
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=cxxopts
4 pkgver=3.1.1
5 pkgrel=1
6 pkgdesc="Lightweight C++ command line option parser"
7 arch=(any)
8 url="https://github.com/jarro2783/cxxopts"
9 license=(MIT)
10 makedepends=(cmake)
11 source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
12 sha512sums=('248e54e23564660467c7ecf50676b86d3cd10ade89e0ac1d23deb71334cb89cc5eb50f624b385d5119a43ca68ff8b1c74af82dc699b5ccfae54d6dcad4fd9447')
13 b2sums=('180dd3b308c3f16f332336f126f757b7996b4fdd6ddb53e777cb6768c7981286442ad4ef5759db0f2891ded1a8b9b6cd5c6828672cd25f13e7aea8f98c79dd8d')
15 build() {
16   local cmake_options=(
17     -DCMAKE_INSTALL_PREFIX=/usr
18     -DCMAKE_BUILD_TYPE=None
19     -Wno-dev
20     -B build
21     -S $pkgname-$pkgver
22   )
24   cmake "${cmake_options[@]}"
25   cmake --build build --verbose
28 check() {
29   ctest --test-dir build --output-on-failure
32 package() {
33   DESTDIR="$pkgdir" cmake --install build
34   install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
35   install -vDm 644 $pkgname-$pkgver/{CHANGELOG,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"