APKBUILD 1.97 KB
Newer Older
1
2
3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openwsman
4
pkgver=2.7.0
5
pkgrel=2
6
7
8
9
10
pkgdesc="Opensource Implementation of WS-Management"
url="https://openwsman.github.io"
arch="all"
license="custom BSD-3-Clause"
options="!check"  # No test suite
11
makedepends="cmake swig openssl-dev perl-dev curl-dev python3-dev sblim-sfcc-dev libxml2-dev"
12
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
13
source="$pkgname-$pkgver.tar.gz::https://github.com/Openwsman/openwsman/archive/v$pkgver.tar.gz
14
15
	fix-musl-build.patch
	default-config.patch"
16
17
18
19
20
21

# secfixes:
#   2.6.10-r0:
#     - CVE-2019-3833
#   2.6.4-r0:
#     - CVE-2016-2183
22
23
24
25
26
27
28
29
30

prepare() {
	default_prepare
	mkdir -p build
}

build() {
	cd "$builddir"/build
	cmake \
31
		-DCMAKE_BUILD_TYPE=None \
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
		-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"
}

69
sha512sums="e61792eafd09e3608c736091d2742049086adaf5fffcda9391e4712ed1dedf3a533546a6af61ea6ce49d4cf4fb3649cb168f20260c4e975797395d6e565c6c37  openwsman-2.7.0.tar.gz
70
71
d031a3fd5f30b71ef87d7fd9c241baf55c20953c175ab0eb6192f9971b7b8a3a9c18693fa2cd468ed7f7ef94170281b7db5e987ba1b88c92d64231e560e91542  fix-musl-build.patch
3c10cb34a0bb0d70461225c0944c0fdaf9aadba2c78ee8122dcf8b493190bc86db0252cc74a7fdb178a2d0a0c26fb3323a1cd8dce320fe21eb0ad2860e42a0f1  default-config.patch"