summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8606fb5c4245bb8a0c4c25cc512478aeac8bfe4 (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
39
40
# Maintainer: Wesley Chan https://aur.archlinux.org/account/Wesley_Chan
# Original authors: Sven-Hendrik Haase <sh@lutzhaase.com>, Markus Martin <markus@archwyrm.net>

pkgname=yaml-cpp-git
pkgver=r684.e92321a
pkgrel=1
pkgdesc="YAML parser and emitter in C++, written around the YAML 1.2 spec"
url="https://github.com/jbeder/yaml-cpp"
arch=('i686' 'x86_64')
license=('MIT')
depends=('gcc-libs')
conflicts=('yaml-cpp')
provides=('yaml-cpp')
makedepends=('boost' 'cmake')
source=(${pkgname}::git+https://github.com/jbeder/yaml-cpp.git)
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd $srcdir/$pkgname

    cmake . -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON
    make
}

package() {
    cd $srcdir/$pkgname

    make DESTDIR=$pkgdir install

    install -Dm644 yaml-cpp-config.cmake $pkgdir/usr/lib/cmake/${pkgname}/yaml-cpp-config.cmake
    install -Dm644 yaml-cpp-config-version.cmake $pkgdir/usr/lib/cmake/${pkgname}/yaml-cpp-config-version.cmake
    install -Dm644 yaml-cpp-targets.cmake $pkgdir/usr/lib/cmake/${pkgname}/yaml-cpp-targets.cmake

    install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}