summaryrefslogtreecommitdiff
path: root/cfengine/PKGBUILD
blob: bb5578d31acc0e54f34b85ef7fbdf2219221d62f (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
70
71
72
# originally by:
# Maintainer: Vanush Misha Paturyan <ektich+cfengine-aur@gmail.com>
# https://github.com/zizzfizzix/pkgbuilds
#
# Contributor: Kuba Serafinowski <zizzfizzix AT gmail DOT com>
# Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
# Contributor: Christian Berendt <christian@thorlin.de>

pkgname=cfengine
pkgver=3.4.1
pkgrel=2
epoch=1
pkgdesc='Automated suite of programs for configuring and maintaining Unix-like computers.'
url='http://www.cfengine.org'
license=('GPL3')
arch=('i686' 'x86_64')
depends=('lmdb' 'openssl' 'pcre' 'libxml2' 'pam' 'tokyocabinet')
makedepends=('which')
optdepends=('libvirt' 'postgresql-libs' 'libmariadbclient' 'acl')
install=${pkgname}.install
source=(
	"${pkgname}-${pkgver}.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/${pkgname}-${pkgver}.tar.gz"
	'cf-execd.service'
	'cf-monitord.service'
	'cf-serverd.service'
	'cfengine3.service'
)
md5sums=(
	'96e2221ca0e1341f4abacde81df41ac2'
	'a6d35b4460d5478afe03c7b920f09da6'
	'674271fe623d27b0410642cabc1d442e'
	'542358aab95c89017ca6dc65b864c079'
	'2f950573baa3dfa7ee06e011ece2f2d8'
)

build() {
	cd ${srcdir}/${pkgname}-${pkgver}

	./configure \
		--prefix=/usr \
		--with-workdir=/var/${pkgname} \
		--with-openssl \
		--with-pcre \
		--with-libacl=check \
		--with-libxml2 \
		--with-libvirt=check \
		--with-lmdb \
		--with-mysql=check \
		--with-postgresql=check

	make
}

package() {
	cd ${srcdir}/${pkgname}-${pkgver}
	make DESTDIR=$pkgdir install

	install -D -m644 ${srcdir}/cf-execd.service \
		${pkgdir}/usr/lib/systemd/system/cf-execd.service
	install -D -m644 ${srcdir}/cf-serverd.service \
		${pkgdir}/usr/lib/systemd/system/cf-serverd.service
	install -D -m644 ${srcdir}/cf-monitord.service \
		${pkgdir}/usr/lib/systemd/system/cf-monitord.service
	install -D -m644 ${srcdir}/cfengine3.service \
		${pkgdir}/usr/lib/systemd/system/cfengine3.service

	install -d -m755 ${pkgdir}/var/cfengine/bin

	for f in $(ls ${pkgdir}/usr/bin); do
		/bin/ln -s /usr/bin/$f ${pkgdir}/var/cfengine/bin
	done
}