# Contributor: Sören Tempel # Contributor: Christian Franke # Maintainer: pkgname=libyang pkgver=0.16_p3 _realver=${pkgver/_p/-r} pkgrel=0 pkgdesc="YANG data modelling language parser and toolkit" url="https://github.com/CESNET/libyang" arch="all" license="BSD-3-Clause-Clear" depends="" makedepends="bison cmake cmocka-dev flex pcre-dev" install="" subpackages="$pkgname-dev $pkgname-doc" source="${pkgname}-${pkgver}.tar.gz::https://github.com/CESNET/$pkgname/archive/v$_realver.tar.gz" builddir="$srcdir/$pkgname-$_realver" build() { cd "$builddir" if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DENABLE_BUILD_TESTS=ON \ -DENABLE_LYD_PRIV=ON \ ${CMAKE_CROSSOPTS} make } check() { cd "$builddir" make test } package() { cd "$builddir" make DESTDIR="$pkgdir" install } sha512sums="d4d936e6429379207b763850aab372310e3683d3c26d4158273584efe5835a93d2c58971ae1d1e8b7b2f8688cadfcd863b007ba877776f452bbf55f8ddd420a2 libyang-0.16_p3.tar.gz"