blob: d0441e3aae89d0fb73b8044e94380187f89dfc3a (
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
75
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $
PARCH=${P/_/}
DESCRIPTION="An agent/software robot and a high level policy language for building expert systems to administrate and configure large computer networks"
HOMEPAGE="http://www.iu.hio.no/cfengine/"
SRC_URI="ftp://ftp.iu.hio.no/pub/cfengine/${PARCH}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc"
DEPEND="virtual/glibc
>=sys-libs/db-3.2
>=dev-libs/openssl-0.9.6k"
S="${WORKDIR}/${PARCH}"
src_compile() {
# Enforce /var/cfengine for historical compatibility
econf \
--with-workdir=/var/cfengine \
--with-berkeleydb=/usr || die
# Fix Makefile to skip doc & inputs install to wrong locations
sed -i -e 's/\(SUBDIRS.*\) inputs doc/\1/' Makefile
emake || die
}
src_install() {
make DESTDIR=${D} install || die
dodoc AUTHORS ChangeLog COPYING DOCUMENTATION README TODO
# Manually install doc and inputs
doinfo doc/*.info*
dohtml doc/*.html
dodoc inputs/*.example
fperms 700 /var/cfengine
keepdir /var/cfengine/bin
keepdir /var/cfengine/inputs
keepdir /var/cfengine/modules
# Copy the cfportage module
insinto /var/cfengine/modules
doins ${FILESDIR}/module:cfportage
dodoc ${FILESDIR}/cfportage.README
}
pkg_postinst() {
if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]
then
einfo "Generating keys for localhost."
/usr/sbin/cfkey
fi
# Copy cfagent into the cfengine tree otherwise cfexecd won't
# find it. Most hosts cache their copy of the cfengine
# binaries here. This is the default search location for the
# binaries.
cp /usr/sbin/cf{agent,servd,execd} /var/cfengine/bin/
# let people know about the cfportage module
einfo
einfo "gentoo's cfengine package now comes with a module"
einfo "for checking for installed software using portage."
einfo "please see the readme for details."
einfo "/usr/share/doc/${PF}/cfportage.README.gz"
einfo
}
|