Summary: A systems administration tool for networks Name: cfengine Version: 3.5.1 Release: 1 License: GPLv2+ Group: Applications/System Source0: ftp://ftp.iu.hio.no/pub/cfengine/%{name}-%{version}-3.tar.gz Source1: cf-execd.aix.init Source2: cf-monitord.aix.init Source3: cf-serverd.aix.init Patch0: %{name}-%{version}-aix.patch URL: http://www.cfengine.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: AIX-rpm >= 5.2.0.0 BuildRequires: bison, flex, m4 BuildRequires: db4-devel >= 4.7.25-2, openssl-devel >= 1.0.1, pcre-devel >= 7.9 BuildRequires: libxml2-devel >= 2.7.8-3 BuildRequires: tokyocabinet-devel >= 1.4.47-1 Requires: AIX-rpm >= 5.2.0.0 Requires: db4 >= 4.7.25-2, openssl >= 1.0.1, pcre >= 7.9 Requires: libxml2 >= 2.7.8-3 Requires: tokyocabinet >= 1.4.47-1 %description Cfengine, or the configuration engine is an agent/software robot and a very high level language for building expert systems to administrate and configure large computer networks. Cfengine uses the idea of classes and a primitive form of intelligence to define and automate the configuration and maintenance of system state, for small to huge configurations. Cfengine is designed to be a part of a computer immune system. %package doc Summary: Documentation for cfengine Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains the documentation for cfengine. %prep %setup -q %patch0 %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --with-openssl=%{_prefix} \ --with-pcre=%{_prefix} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # It's ugly, but thats the way Mark wants to have it. :( # If we don't create this link, cfexecd will not be able to start # (hardcoded) /var/bin/cfagent in scheduled intervals. Other option # would be to patch cfengine to use %{_bindir}/cfagent mkdir -p ${RPM_BUILD_ROOT}/var/%{name}/bin ln -sf %{_bindir}/cf-agent ${RPM_BUILD_ROOT}/var/%{name}/bin/ ln -sf %{_bindir}/cf-promises ${RPM_BUILD_ROOT}/var/%{name}/bin/ # All this stuff is pushed into doc/contrib directories rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name} # Startup files for cf-execd, cf-monitord and cf-serverd mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-execd cp %{SOURCE2} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-monitord cp %{SOURCE3} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-serverd chmod 0755 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/* ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-execd ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-monitord ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-serverd cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . cd ${RPM_BUILD_ROOT}%{_datadir} mkdir -p %{name} mv CoreBase doc %{name}/ %post # cfagent won't run nicely, unless your host has keys. if [ ! -f /var/%{name}/ppkeys/localhost.priv ] ; then %{_bindir}/cf-key >/dev/null || : fi %preun if [ "$1" = "0" ] ; then /etc/rc.d/init.d/cf-monitord stop || : /etc/rc.d/init.d/cf-execd stop || : /etc/rc.d/init.d/cf-serverd stop || : fi %postun if [ $1 -ge 1 ] ; then /etc/rc.d/init.d/cf-monitord restart || : /etc/rc.d/init.d/cf-execd restart || : /etc/rc.d/init.d/cf-serverd restart || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog %{_bindir}/* %{_libdir}/libpromises* #%{_mandir}/man8/* /etc/rc.d/init.d/cf-execd /etc/rc.d/rc2.d/Scf-execd /etc/rc.d/rc3.d/Scf-execd /etc/rc.d/rc2.d/Kcf-execd /etc/rc.d/rc3.d/Kcf-execd /etc/rc.d/init.d/cf-monitord /etc/rc.d/rc2.d/Scf-monitord /etc/rc.d/rc3.d/Scf-monitord /etc/rc.d/rc2.d/Kcf-monitord /etc/rc.d/rc3.d/Kcf-monitord /etc/rc.d/init.d/cf-serverd /etc/rc.d/rc2.d/Scf-serverd /etc/rc.d/rc3.d/Scf-serverd /etc/rc.d/rc2.d/Kcf-serverd /etc/rc.d/rc3.d/Kcf-serverd /var/%{name} %{_datadir}/%{name} /usr/bin/* %files doc %defattr(-,root,system,-) %{_datadir}/%{name} %changelog * Thu Jul 25 2013 Michael Perzl - 3.5.1-1 - updated to version 3.5.1-3 * Thu Jul 25 2013 Michael Perzl - 3.5.0-1 - updated to version 3.5.0 * Thu Jul 25 2013 Michael Perzl - 3.4.5-1 - updated to version 3.4.5 * Thu Apr 04 2013 Michael Perzl - 3.4.4-1 - updated to version 3.4.4 * Wed Feb 27 2013 Michael Perzl - 3.4.3-1 - updated to version 3.4.3 * Wed Feb 27 2013 Michael Perzl - 3.4.2-1 - updated to version 3.4.2 * Tue Jan 08 2013 Michael Perzl - 3.4.1-1 - updated to version 3.4.1 * Tue Jan 08 2013 Michael Perzl - 3.4.0-1 - updated to version 3.4.0 * Tue Jan 08 2013 Michael Perzl - 3.3.9-1 - updated to version 3.3.9 * Fri Oct 19 2012 Michael Perzl - 3.3.8-1 - updated to version 3.3.8 * Mon Jul 30 2012 Michael Perzl - 3.3.5-1 - updated to version 3.3.5 * Thu Jun 21 2012 Michael Perzl - 3.3.4-1 - updated to version 3.3.4 * Tue Jun 12 2012 Michael Perzl - 3.3.3-1 - updated to version 3.3.3 * Thu May 17 2012 Michael Perzl - 3.3.2-1 - updated to version 3.3.2 * Tue May 15 2012 Michael Perzl - 3.3.1-1 - updated to version 3.3.1 * Tue Apr 10 2012 Michael Perzl - 3.3.0-1 - updated to version 3.3.0 * Tue Apr 10 2012 Michael Perzl - 3.2.4-1 - updated to version 3.2.4 * Fri Oct 28 2011 Michael Perzl - 3.2.3-1 - updated to version 3.2.3 * Fri Oct 28 2011 Michael Perzl - 3.2.1-1 - updated to version 3.2.1 * Wed May 25 2011 Michael Perzl - 3.1.5-1 - updated to version 3.1.5 * Tue Feb 15 2011 Michael Perzl - 3.1.4-1 - updated to version 3.1.4 * Tue Feb 15 2011 Michael Perzl - 3.1.1-2 - fixed the init scripts and %pre and %post scripts * Thu Nov 25 2010 Michael Perzl - 3.1.1-1 - updated to version 3.1.1 * Thu Nov 25 2010 Michael Perzl - 2.2.10-2 - fixed a typo in the %post scripts * Thu Feb 18 2010 Michael Perzl - 2.2.10-1 - first version for AIX V5.1 and higher