# Contributor: Natanael Copa # Maintainer: pkgname=cfengine pkgver=3.7.3 pkgrel=0 pkgdesc="A systems administration tool for networks" url="http://www.cfengine.org/" arch="all" license="GPLv3" depends="" depends_dev="" makedepends="$depends_dev lmdb-dev openssl-dev bison flex-dev acl-dev pcre-dev linux-headers" install="" subpackages="$pkgname-doc $pkgname-masterfiles" source="https://cfengine-package-repos.s3.amazonaws.com/tarballs/$pkgname-$pkgver.tar.gz https://cfengine-package-repos.s3.amazonaws.com/tarballs/$pkgname-masterfiles-$pkgver.tar.gz" _builddir="$srcdir"/cfengine-${pkgver%_p*} _builddirmasterfiles="$srcdir"/cfengine-masterfiles-${pkgver%_p*} prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # Also extract masterfiles cd $srcdir tar xf $pkgname-masterfiles-$pkgver.tar.gz } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --with-pic \ --prefix=/usr \ --enable-fhs \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-lmdb \ --without-pam \ || return 1 make || return 1 } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 } masterfiles() { pkgdesc="Cfengine default masterfiles" arch="noarch" depends="cfengine" cd "$_builddirmasterfiles" ./configure \ --prefix=/var/lib/cfengine \ || return 1 #make install DESTDIR="$pkgdir/../$pkgname-masterfiles" || return 1 make install DESTDIR="$subpkgdir" || return 1 } md5sums="dcd0a8b9490dfafad124c5135900f08b cfengine-3.7.3.tar.gz f7d1260a6fe9f6ce9a00c70c984a7252 cfengine-masterfiles-3.7.3.tar.gz" sha256sums="19f861f5e1e13941575b28bd8436b1b0d68dce6b48b53f10d341f3b236ea72ce cfengine-3.7.3.tar.gz cf5d05f9b10de29d072a369d0fedd408ac364a30140c209c06476066dd3ee4b5 cfengine-masterfiles-3.7.3.tar.gz" sha512sums="28d02db5b81d05e257d5653b7bc306f31b9b9c5460cf381b16142e4f640ad8ff88aea58902db79a0460084c57ef257917ac324b1ac1b3777e3c4a4d4dac5f5c1 cfengine-3.7.3.tar.gz 27bd25b2eac3e2d1f74952685055f307da61f5371531481f1c56cb124addc8373f2c1f529d566824b327b92c056d2529fda35190110e18ccc0d368bbbee4cb2f cfengine-masterfiles-3.7.3.tar.gz"