aboutsummaryrefslogtreecommitdiffstats
path: root/community/cfengine/APKBUILD
blob: c02b34b7917cfe04c3e1cedab5716b6b44655744 (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
61
62
63
64
65
66
67
68
69
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Olivier Mauras <olivier@mauras.ch>
pkgname=cfengine
pkgver=3.10.1
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 libressl-dev bison flex-dev
	acl-dev pcre-dev linux-headers"
install=""
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*}
prepare() {
	local i
	cd "$builddir"
	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"
	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
}

sha512sums="13de610129474e71dbd58e7f29a2fe6754de3da85622983050ec724fda308b9338dd23ac1dfb277b7860940bd6f2be23792a9ea4926b81c8b654ea3b7f8a2e6b  cfengine-3.10.1.tar.gz
7b189cbc476ec9bccc0380bf9ee8a2b4a5862852f0ab3dd2a283080ee51cd10e3c19a5adbeeb81bead458e6f3fdd165b7d609659e98f37c3f7d4afa3e8550e66  cfengine-masterfiles-3.10.1.tar.gz"