summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6814b0e7cb97b83680c51a9551afcc5347425098 (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
# Maintainer: Michael Yang <ohmyarchlinux@gmail.com>

pkgname=docopt.cpp-git
pkgver=0.6.2.r83.a46ae7f
pkgrel=1
pkgdesc="C++11 port of docopt"
arch=('i686' 'x86_64')
url="https://github.com/docopt/docopt.cpp/"
license=('MIT')
makedepends=('git' 'cmake>=3.1.0')
conflicts=('docopt.cpp')
provides=('docopt.cpp')
source=("git://github.com/docopt/docopt.cpp.git")
sha512sums=('SKIP')

pkgver() {
  cd docopt.cpp
  echo "0.6.2.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  mkdir -p build
}

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

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