summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1f62f9de68fcbc94a796d063318e05add5ff4d2a (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
# Maintainer: Václav Kubernát <sir.venceslas@gmail.com>

pkgname=libyang-cpp-git
_gitname=libyang-cpp
pkgver=r319.7bb4662
pkgrel=1
pkgdesc='C++ bindings for the libyang library'
url='https://github.com/CESNET/libyang-cpp/'
arch=('i686' 'x86_64' 'armv7h')
license=('BSD')
depends=('libyang' 'glibc' 'gcc-libs')
makedepends=('git' 'cmake' 'pkg-config' 'doctest')
conflicts=('libyang-cpp' 'libyang-cpp-git')
provides=('libyang-cpp')
source=('git+https://github.com/CESNET/libyang-cpp.git')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/$_gitname"

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

check() {
	ctest --test-dir "$srcdir/build"
}

build() {
	cmake -S "$srcdir/$_gitname" -B "$srcdir/build" -DCMAKE_INSTALL_PREFIX=/usr

	cmake --build "$srcdir/build"
}

package() {
	DESTDIR="$pkgdir" cmake --install "$srcdir/build"
	install -Dm644 $_gitname/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgbase
}