aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cfengine/APKBUILD
blob: 79d66e9d8a8ce99597d885b26354f0cb9f3f1910 (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
73
74
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=cfengine
pkgver=3.7.2
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="aff92abe87a5424680afd285d0384bef  cfengine-3.7.2.tar.gz
48335259f199c87c2d7652ed8405f21c  cfengine-masterfiles-3.7.2.tar.gz"
sha256sums="aad9ae260864acbdf2aa441c208365460f9a8ecaa53618bbdb465e37aef4ade5  cfengine-3.7.2.tar.gz
ed2026d0deca24e9094ec1d0e84a9488eebd470cc23fec940eadbb7106515bc5  cfengine-masterfiles-3.7.2.tar.gz"
sha512sums="8b4d0dac81cb3734489e3e1d60a034c3074d710f35a6c2ab35cffe9c066a63c3214b062ef4116ff3ef46461c8ce53ebb02c6513cb49f9edf2c9a81f4679066e6  cfengine-3.7.2.tar.gz
e2a6ceba4db90e6b2cd4f30fc2c276012660aca8a76fbd5bbc3debd8e6226cd5f8f270f5936b38e1ccd36cee706fd697bfde5c96739bde38d8c11f4ef3f0f86b  cfengine-masterfiles-3.7.2.tar.gz"