diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/cfengine/cfengine-3.5.3.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/cfengine/cfengine-3.5.3.ebuild')
-rw-r--r-- | net-misc/cfengine/cfengine-3.5.3.ebuild | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/net-misc/cfengine/cfengine-3.5.3.ebuild b/net-misc/cfengine/cfengine-3.5.3.ebuild new file mode 100644 index 000000000000..022cb98fc804 --- /dev/null +++ b/net-misc/cfengine/cfengine-3.5.3.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools flag-o-matic + +MY_PV="${PV//_beta/b}" +MY_PV="${MY_PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="An automated suite of programs for configuring and maintaining +Unix-like computers" +HOMEPAGE="http://www.cfengine.org/" +SRC_URI="http://cfengine.com/source-code/download?file=${MY_P}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="3" +KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86" + +IUSE="acl examples libvirt mysql postgres +qdbm selinux tokyocabinet vim-syntax xml" + +DEPEND="acl? ( virtual/acl ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + selinux? ( sys-libs/libselinux ) + tokyocabinet? ( dev-db/tokyocabinet ) + qdbm? ( dev-db/qdbm ) + libvirt? ( app-emulation/libvirt ) + xml? ( dev-libs/libxml2:2 ) \ + dev-libs/openssl + dev-libs/libpcre" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +REQUIRED_USE="qdbm? ( !tokyocabinet ) + tokyocabinet? ( !qdbm ) + !tokyocabinet? ( qdbm ) + !qdbm? ( tokyocabinet )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + + epatch "${FILESDIR}/${PN}-3.4.5-acl.patch" + epatch "${FILESDIR}/${P}-ifconfig.patch" + + eautoreconf +} + +src_configure() { + # Enforce /var/cfengine for historical compatibility + + econf \ + --enable-fhs \ + --docdir=/usr/share/doc/${PF} \ + --with-workdir=/var/cfengine \ + --with-pcre \ + $(use_with acl libacl) \ + $(use_with qdbm) \ + $(use_with tokyocabinet) \ + $(use_with postgres postgresql) \ + $(use_with mysql mysql check) \ + $(use_with libvirt) \ + $(use_enable selinux) + + # Fix Makefile to skip inputs, see below "examples" + #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die + + # We install the documentation through portage + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die +} + +src_install() { + newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die + newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die + newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die + + emake DESTDIR="${D}" install || die + + # fix ifconfig path in provided promises + find "${D}"/usr/share -name "*.cf" | xargs sed -i "s,/sbin/ifconfig,$(which ifconfig),g" + + # Evil workaround for now.. + mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF} + + dodoc AUTHORS + + if ! use examples; then + rm -rf "${D}"/usr/share/doc/${PF}/example* + fi + + # Create cfengine working directory + dodir /var/cfengine/bin + fperms 700 /var/cfengine + + # 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. + for bin in promises agent monitord serverd execd runagent key; do + dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die + done +} + +pkg_postinst() { + echo + elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0" + echo + einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cf-execd -F" + echo + + elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" + + # Fix old cf-servd, remove it after some releases. + local found=0 + for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do + found=1 + rm $fname + ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:') + done + + if [ "${found}" -eq 1 ]; then + echo + elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd" + fi +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cf-key + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} |