diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-12-05 08:17:26 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-12-05 08:17:26 +0000 |
commit | ccf4f2eabd09db9eabcffc99ebdea31e435fecfd (patch) | |
tree | b2ce44e57f397f5d64dd8072bce73ccc8a32339a /net-misc/cfengine/cfengine-2.2.8-r1.ebuild | |
parent | Making repoman happy (diff) | |
download | historical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.tar.gz historical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.tar.bz2 historical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.zip |
Avoid a collision on the lock names inside the packages method when the package name, cmp and action are the same, but version and define/elsedefine are different.
Package-Manager: portage-2.2_rc16/cvs/Linux 2.6.28-rc5-00117-g7f0f598 x86_64
Diffstat (limited to 'net-misc/cfengine/cfengine-2.2.8-r1.ebuild')
-rw-r--r-- | net-misc/cfengine/cfengine-2.2.8-r1.ebuild | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/net-misc/cfengine/cfengine-2.2.8-r1.ebuild b/net-misc/cfengine/cfengine-2.2.8-r1.ebuild new file mode 100644 index 000000000000..fef5a86f8ed9 --- /dev/null +++ b/net-misc/cfengine/cfengine-2.2.8-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/cfengine-2.2.8-r1.ebuild,v 1.1 2008/12/05 08:17:26 robbat2 Exp $ + +inherit eutils + +DESCRIPTION="An automated suite of programs for configuring and maintaining +Unix-like computers" +HOMEPAGE="http://www.cfengine.org/" +SRC_URI="http://www.cfengine.org/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86" +IUSE="" + +DEPEND=">=sys-libs/db-4 + >=dev-libs/openssl-0.9.7 + app-portage/portage-utils" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.2-package-locking-fixup.patch +} + +src_compile() { + # Enforce /var/cfengine for historical compatibility + econf \ + --with-workdir=/var/cfengine \ + --with-berkeleydb=/usr || die + + # Fix Makefile to skip doc,inputs, & contrib install to wrong locations + sed -i -e 's/\(DIST_SUBDIRS.*\) contrib inputs doc/\1/' Makefile + sed -i -e 's/\(SUBDIRS.*\) contrib inputs/\1/' Makefile + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile + + # Fix man pages + sed -i -e 's/\/usr\/local/\/usr/' doc/*.8 + + emake || die +} + +src_install() { + newinitd "${FILESDIR}"/cfservd.rc6 cfservd + newinitd "${FILESDIR}"/cfenvd.rc6 cfenvd + newinitd "${FILESDIR}"/cfexecd.rc6 cfexecd + + make DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog README TODO INSTALL + + # Manually install doc and inputs + doman doc/*.8 + docinto examples + dodoc inputs/*.example + + # Create cfengine working directory + mkdir -p "${D}"/var/cfengine + fperms 700 /var/cfengine + keepdir /var/cfengine/bin + keepdir /var/cfengine/inputs + dodir /var/cfengine/modules +} + +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/ + + einfo + einfo "NOTE: The cfportage module has been deprecated in favor of the" + einfo " upstream 'packages' action." + einfo + einfo "Init scripts for cfservd, cfenvd, and cfexecd are now provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cfexecd -F" + einfo +} |