blob: 280b858093780257896f30da5f561a9f0292c6a3 (
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
41
42
43
44
45
|
# Contributor: Christian Franke <nobody@nowhere.ws>
# 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"
|