/[gentoo-x86]/net-misc/cfengine/cfengine-2.1.22-r2.ebuild
Gentoo

Contents of /net-misc/cfengine/cfengine-2.1.22-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Aug 25 18:26:51 2010 UTC (9 years, 3 months ago) by idl0r
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Clean up. Fixes bug 328655 as well.

(Portage version: 2.2_rc69/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/cfengine-2.1.22-r2.ebuild,v 1.3 2010/01/26 11:00:16 robbat2 Exp $
4
5 inherit eutils
6
7 DESCRIPTION="An automated suite of programs for configuring and maintaining
8 Unix-like computers"
9 HOMEPAGE="http://www.cfengine.org/"
10 SRC_URI="http://www.cfengine.org/tarballs/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 arm ppc sparc x86"
15 IUSE=""
16
17 DEPEND=">=sys-libs/db-3.2
18 >=dev-libs/openssl-0.9.7"
19 RDEPEND="${DEPEND}"
20
21 src_unpack() {
22 unpack ${A}
23 cd "${S}"
24
25 epatch "${FILESDIR}"/${P}-package-fix.patch
26 epatch "${FILESDIR}"/${PN}-2.1-package-locking-fixup.patch
27 # DB4.8 uses 'ENV' as a typedef, and it conflicts with symbols in cfengine
28 # on the same name. Change the cfengine ones.
29 epatch "${FILESDIR}"/${PN}-2.1.22-db48-namespace-fix.patch
30 }
31
32 src_compile() {
33 # Enforce /var/cfengine for historical compatibility
34 econf \
35 --with-workdir=/var/cfengine \
36 --with-berkeleydb=/usr || die
37
38 # Fix Makefile to skip doc,inputs, & contrib install to wrong locations
39 sed -i -e 's/\(DIST_SUBDIRS.*\) contrib inputs doc/\1/' Makefile
40 sed -i -e 's/\(SUBDIRS.*\) contrib inputs/\1/' Makefile
41 sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile
42
43 emake || die
44 }
45
46 src_install() {
47 newinitd "${FILESDIR}"/cfservd.rc6 cfservd
48
49 make DESTDIR="${D}" install || die
50 dodoc AUTHORS ChangeLog README TODO INSTALL
51
52 # Manually install doc and inputs
53 doinfo doc/*.info*
54 dohtml doc/*.html
55 doman doc/*.8
56 dodoc "${FILESDIR}"/cfportage.README
57 docinto examples
58 dodoc inputs/*.example
59
60 # Create cfengine working directory
61 mkdir -p "${D}"/var/cfengine
62 fperms 700 /var/cfengine
63 keepdir /var/cfengine/bin
64 keepdir /var/cfengine/inputs
65 dodir /var/cfengine/modules
66 tar jxf "${FILESDIR}"/module-cfportage.tbz2 -C "${D}"/var/cfengine/modules
67 fowners root:0 /var/cfengine/modules/module\:cfportage
68 }
69
70 pkg_postinst() {
71 if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]
72 then
73 einfo "Generating keys for localhost."
74 /usr/sbin/cfkey
75 fi
76
77 # Copy cfagent into the cfengine tree otherwise cfexecd won't
78 # find it. Most hosts cache their copy of the cfengine
79 # binaries here. This is the default search location for the
80 # binaries.
81
82 cp /usr/sbin/cf{agent,servd,execd} /var/cfengine/bin/
83
84 einfo
85 einfo "Now an init script for cfservd is provided."
86 einfo
87 einfo "To run cfengine out of cron every half hour modify your crontab:"
88 einfo "0,30 * * * * /usr/sbin/cfexecd -F"
89 einfo
90 }

  ViewVC Help
Powered by ViewVC 1.1.20