diff options
author | Christian Franke <nobody@nowhere.ws> | 2019-03-25 23:01:29 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-03-26 12:20:10 +0100 |
commit | 835e613f4678788b44aef1c6fd7d356f7ad38eba (patch) | |
tree | fe6dbf0d64cc3e84b1de4bb5c32808ea704a8e21 /testing/libyang | |
parent | 69971deaafae9a4d6b57b61a311741c13aad2e8e (diff) | |
download | aports-835e613f4678788b44aef1c6fd7d356f7ad38eba.tar.bz2 aports-835e613f4678788b44aef1c6fd7d356f7ad38eba.tar.xz |
testing/libyang: new aport
Diffstat (limited to 'testing/libyang')
-rw-r--r-- | testing/libyang/APKBUILD | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/libyang/APKBUILD b/testing/libyang/APKBUILD new file mode 100644 index 0000000000..9122179315 --- /dev/null +++ b/testing/libyang/APKBUILD @@ -0,0 +1,44 @@ +# Contributor: Christian Franke <nobody@nowhere.ws> +# Maintainer: +pkgname=libyang +pkgver=0.16-r3 +pkgrel=0 +pkgdesc="YANG data modelling language parser and toolkit" +url="https://github.com/CESNET/libyang" +arch="all" +license="BSD" +depends="pcre" +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$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" + +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-r3.tar.gz" |