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

Contents of /net-misc/cfengine/cfengine-3.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Oct 15 20:52:29 2010 UTC (9 years, 1 month ago) by idl0r
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Remove cfengine-3.0.4. Revision bump from cfengine-2.2.10-r2 to -r3, fixes bug 339808. Remove ~arm, ~sparc, ~ppc keywords due to libvirt useflag.

(Portage version: 2.2_rc96/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-3.0.4.ebuild,v 1.4 2010/08/29 10:57:19 idl0r Exp $
4
5 EAPI="2"
6
7 inherit eutils
8
9 MY_PV="${PV//_beta/b}"
10 MY_P="${PN}-${MY_PV}"
11
12 DESCRIPTION="An automated suite of programs for configuring and maintaining
13 Unix-like computers"
14 HOMEPAGE="http://www.cfengine.org/"
15 SRC_URI="http://www.cfengine.org/tarballs/${MY_P}.tar.gz"
16
17 LICENSE="GPL-3"
18 SLOT="3"
19 KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
20 IUSE="mysql postgres selinux vim-syntax"
21
22 DEPEND=">=sys-libs/db-4
23 >=dev-libs/openssl-0.9.7
24 dev-libs/libpcre
25 mysql? ( virtual/mysql )
26 postgres? ( dev-db/postgresql-base )
27 app-portage/portage-utils"
28 RDEPEND="${DEPEND}"
29 PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
30 S="${WORKDIR}/${MY_P}"
31
32 src_configure() {
33 local myconf
34
35 if use mysql || use postgres ; then
36 myconf="--with-sql"
37 else
38 myconf="--without-sql"
39 fi
40 # selinux incorrectly enables if it sets --disable-selinux
41 if use selinux ; then
42 myconf="${myconf} $(use_enable selinux)"
43 fi
44
45 # Enforce /var/cfengine for historical compatibility
46 econf \
47 "${myconf}" \
48 --with-workdir=/var/cfengine \
49 --docdir=/usr/share/doc/"${P}" \
50 --with-berkeleydb=/usr || die
51
52 # Fix Makefile to skip inputs
53 sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile
54 sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile
55 # Fix Makefiles to install tests in correct directory
56 for i in file_masters file_operands units ; do
57 sed -i -e "s/\(docdir.*\) =.*/\1 = \/usr\/share\/doc\/${P}\/tests\/${i}/" \
58 tests/${i}/Makefile
59 done
60 }
61
62 src_install() {
63 newinitd "${FILESDIR}"/cf-serverd.rc6 cf-servd
64 newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord
65 newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd
66
67 make DESTDIR="${D}" install || die
68 dodoc AUTHORS ChangeLog README TODO INSTALL
69
70 # Manually install inputs
71 docinto examples
72 dodoc inputs/*.cf
73
74 # Create cfengine working directory
75 mkdir -p "${D}"/var/cfengine
76 fperms 700 /var/cfengine
77 keepdir /var/cfengine/bin
78 keepdir /var/cfengine/inputs
79 }
80
81 pkg_postinst() {
82 # Copy cfagent into the cfengine tree otherwise cfexecd won't
83 # find it. Most hosts cache their copy of the cfengine
84 # binaries here. This is the default search location for the
85 # binaries.
86
87 cp -f /usr/sbin/cf-{agent,serverd,execd} "${ROOT}"/var/cfengine/bin/
88
89 einfo
90 einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided."
91 einfo
92 einfo "To run cfengine out of cron every half hour modify your crontab:"
93 einfo "0,30 * * * * /usr/sbin/cf-execd -F"
94 einfo
95
96 elog "You MUST generate the keys for cfengine by running:"
97 elog "emerge --config ${CATEGORY}/${PN}"
98 }
99
100 pkg_config() {
101 if [ "${ROOT}" == "/" ]; then
102 if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
103 einfo "Generating keys for localhost."
104 /usr/sbin/cf-key
105 fi
106 else
107 die "cfengine cfkey does not support any value of ROOT other than /."
108 fi
109 }

  ViewVC Help
Powered by ViewVC 1.1.20