aboutsummaryrefslogtreecommitdiffstats
path: root/community/cfengine/APKBUILD
blob: 077a5b7813502aff3f8e916bb2fba86aa38691f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=cfengine
pkgver=3.12.0
pkgrel=0
pkgdesc="A systems administration tool for networks"
url="http://www.cfengine.com/"
arch="all"
license="GPL-3.0"
makedepends="$depends_dev lmdb-dev libressl-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/$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*}
options="!check" # testsuite shows some unknown errors

prepare() {
	default_prepare

	# 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
	make
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir"
}

masterfiles() {
	pkgdesc="Cfengine default masterfiles"
	depends="cfengine"

	cd "$builddirmasterfiles"
	./configure \
		--prefix=/var/lib/cfengine
	#make install DESTDIR="$pkgdir/../$pkgname-masterfiles"
	make install DESTDIR="$subpkgdir"
}

sha512sums="da979c0db5830cd1f18f8f854190f3d50151d6b63bac399056d030e2486ec39dd680071bd6df9ef30e898e00900022b68f27f272f58f99eb8ee36525af9901f5  cfengine-3.12.0.tar.gz
61925dc812f7a02e09e4ff407490f14d8736bbdf36677496fe2c977a8c0e9ba607f144dddc4318aaaeb7ad552c0ccd4ad8dfe9430caa7e67e9b28676622e6b0c  cfengine-masterfiles-3.12.0.tar.gz"