summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5fb3ec18f29d3750170f75218845b45ab95a60d0 (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
# Contributor: Famiu Haque <famiuhaque@gmail.com>

pkgname=docopt.cpp-static-git
pkgver=0.6.3.r5.g400e6dd
pkgrel=1
pkgdesc="C++11 port of docopt (static libraries)"
arch=('x86_64')
url="https://github.com/docopt/docopt.cpp"
license=('MIT' 'BSL-1.0')
makedepends=('git' 'cmake')
conflicts=('docopt' 'docopt.cpp')
provides=('docopt.cpp')
source=("git+${url}.git")
options=('staticlibs')
sha512sums=('SKIP')

pkgver() {
  cd docopt.cpp
  git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g'
}

build() {
  cmake -B build -S docopt.cpp \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib
  make -C build
}

package() {
  make -C build DESTDIR="${pkgdir}" install
  cd docopt.cpp
  install -Dm644 LICENSE-MIT -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}