# Maintainer: Natanael Copa pkgname=cfengine pkgver=3.15.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="de15d8c7b84eadf6a042a89cdf45cda7bb8f0eace3936a7f5699bde9a06a6ee203348e2b11236b55052cdb1008c83687ef282e7bf662c9f9ad3db11cf4429f58 cfengine-3.15.0.tar.gz a5f1f6b5275ee3e8e913aafad2598f76406ba61ea5b5692da23fed7a5fdbd9828c5b9b5fd51ae080e628c483197469c9cc19f8f786b5496fcbbfebeaac1b414b cfengine-masterfiles-3.15.0.tar.gz"