diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2019-03-16 18:10:48 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2019-03-16 18:10:48 +0000 |
commit | 296ebc4581da0e761b5931854acb3acfb591a268 (patch) | |
tree | 7516d7d16a768d0f6a4462e8fdc3a07b1be634f4 /testing/openwsman | |
parent | 9b89f989b762ed0bf6dba85a3abd5b628894dc53 (diff) | |
download | aports-296ebc4581da0e761b5931854acb3acfb591a268.tar.bz2 aports-296ebc4581da0e761b5931854acb3acfb591a268.tar.xz |
testing/openwsman: new aport
Diffstat (limited to 'testing/openwsman')
-rw-r--r-- | testing/openwsman/APKBUILD | 65 | ||||
-rw-r--r-- | testing/openwsman/fix-musl-build.patch | 13 |
2 files changed, 78 insertions, 0 deletions
diff --git a/testing/openwsman/APKBUILD b/testing/openwsman/APKBUILD new file mode 100644 index 0000000000..eb2802267a --- /dev/null +++ b/testing/openwsman/APKBUILD @@ -0,0 +1,65 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=openwsman +pkgver=2.6.9 +pkgrel=0 +pkgdesc="Opensource Implementation of WS-Management" +url="https://openwsman.github.io" +arch="all" +license="custom BSD-3-Clause" +options="!check" # No test suite +makedepends="cmake openssl-dev perl-dev curl-dev python3-dev sblim-sfcc-dev libxml2-dev" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" +source="$pkgname-$pkgver.tar.gz::https://github.com/Openwsman/$pkgname/archive/v$pkgver.tar.gz + fix-musl-build.patch" +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + default_prepare + cd "$builddir" + mkdir -p build +} + +build() { + cd "$builddir"/build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \ + -DCMAKE_CXX_FLAGS="$CFXXLAGS $CPPFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DPACKAGE_ARCHITECTURE=$CARCH \ + -DLIB=lib \ + -DUSE_PAM=NO \ + -DBUILD_PYTHON=OFF \ + -DBUILD_PYTHON3=ON \ + -DBUILD_RUBY_GEM=OFF \ + -DBUILD_JAVA=OFF \ + .. + make +} + +check() { + cd "$builddir"/build +} + +libs() { + pkgdesc="$pkgname libs (aka libwsman)" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/* \ + "$subpkgdir"/usr/lib/ +} + +package() { + cd "$builddir"/build + make DESTDIR="$pkgdir/" install + + mv "$pkgdir/usr/sbin/"* "$pkgdir/usr/bin" + rmdir "$pkgdir/usr/sbin/" + rm "$pkgdir"/etc/pam.d/$pkgname + rmdir "$pkgdir/etc/pam.d/" + install -Dp -m644 ../COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} + +sha512sums="eb09ff0a988e42b618f022e20fbda5572c548501ed24d9f8eba84e49713153431082a93cd68f55395f9823e56d93d623f39c244c9c936cb0a39bdf138b53635c openwsman-2.6.9.tar.gz +d031a3fd5f30b71ef87d7fd9c241baf55c20953c175ab0eb6192f9971b7b8a3a9c18693fa2cd468ed7f7ef94170281b7db5e987ba1b88c92d64231e560e91542 fix-musl-build.patch" diff --git a/testing/openwsman/fix-musl-build.patch b/testing/openwsman/fix-musl-build.patch new file mode 100644 index 0000000000..eb19cd6ae4 --- /dev/null +++ b/testing/openwsman/fix-musl-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/u/lock.c b/src/lib/u/lock.c +index 025eea4..a2b5b14 100644 +--- a/src/lib/u/lock.c ++++ b/src/lib/u/lock.c +@@ -50,7 +50,7 @@ + extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); + #endif + +-#if defined (__SVR4) && defined (__sun) ++#if defined (__SVR4) && defined (__sun) || defined(__linux__) + #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE + #endif + |