# Maintainer: Natanael Copa pkgname=cfengine pkgver=3.14.0 pkgrel=0 pkgdesc="A systems administration tool for networks" url="https://www.cfengine.com/" arch="all" license="GPL-3.0-only" install="$pkgname.post-install" makedepends="$depends_dev lmdb-dev openssl-dev bison flex-dev acl-dev pcre-dev linux-headers" subpackages="$pkgname-doc $pkgname-masterfiles::noarch" source="https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-$pkgver.tar.gz https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-$pkgver.tar.gz" builddirmasterfiles="$srcdir"/cfengine-masterfiles-${pkgver%_p*} options="!check" # testsuite shows some unknown errors # secfixes: # 3.12.2-r0: # - CVE-2019-9929 prepare() { default_prepare # Also extract masterfiles cd $srcdir tar xf $pkgname-masterfiles-$pkgver.tar.gz } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --with-pic \ --prefix=/usr \ --enable-fhs \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-lmdb \ --without-pam make cd "$builddirmasterfiles" ./configure \ --prefix=/var/lib/cfengine make } package() { make install DESTDIR="$pkgdir" # not FHS but the tools seems to require those install -d "$pkgdir"/var/lib/cfengine/bin for i in "$pkgdir"/usr/bin/*; do ln -s ../../../../usr/bin/${i##*/} "$pkgdir"/var/lib/cfengine/bin/ done } masterfiles() { pkgdesc="Cfengine default masterfiles" depends="cfengine" cd "$builddirmasterfiles" make install DESTDIR="$subpkgdir" } sha512sums="375f0a6880778c580b06bfea95c6b46d9757930e633f474f634c0d737996c8df871067e307d6a5915a5e732b1cb5c0ad31d57562f877930ed043a3ab1b3a3b5f cfengine-3.14.0.tar.gz c31433c8c5fa566eb01158d8bfe34fd45216dc4681074994114eeee815d02d09860ee753ad8e15f56fb53492dbe6f65254a7e5e14626d3bc85bb661899f8ea49 cfengine-masterfiles-3.14.0.tar.gz"