# Maintainer: Natanael Copa pkgname=cfengine pkgver=3.20.0 pkgrel=1 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>3 bison flex-dev acl-dev pcre-dev linux-headers" depends="procps" 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=" b834a3e385df9945029d421d3b0804874bb95f6d79af66063f48369d394faa0f512366ddb565fe806c9dba581fa239392cc2a6b2cb03f4d48050be024f686254 cfengine-3.20.0.tar.gz 9c2c5d8358e0069d7fe144177e9a29cc8693dc0eba843033bbb8eabfa79b700c52a1f891951e9cf47af76c0becacf2859a9b11bb696a8cff390aa4824bf233f3 cfengine-masterfiles-3.20.0.tar.gz "