Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 9b9ce49269ea084b68fd0fce9e82a63d > files > 4

cfengine-2.1.15-2mdk.src.rpm

%define	name	cfengine
%define version 2.1.15
%define release %mkrel 2

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Cfengine helps administer remote BSD and System-5-like systems
License:	GPL
Group:		Monitoring
URL:		http://www.cfengine.org
Source0:	ftp://ftp.iu.hio.no/pub/cfengine/%{name}-%{version}.tar.bz2
Source1:	cfengine.conf.bz2
Source2:	cfengine.cron.bz2
Source3:	cfengine.sysinit.bz2
Source4:	cfservd.init.bz2
Source5:	cfexecd.init.bz2
Source6:	cfenvd.init.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}
BuildRequires:	flex
BuildRequires:	bison
BuildRequires:	openssl-devel
BuildRequires:	db4-devel
BuildRequires:	tetex-dvips
BuildRequires:	texinfo
BuildRequires:	tetex-latex

%description
Cfengine, the configuration engine, is a very high level language for
simplifying the task of administrating and configuring large numbers
of workstations. Cfengine uses the idea of classes and a primitive
form of intelligence to define and automate the configuration of large
systems in the most economical way possible.

%package base
Summary:	Cfengine base files
Group:		Monitoring
Provides:	%{name}
Obsoletes:	%{name}

%description base
This package contain the cfengine base files needed by all subpackages.

%package cfagent
Summary:	Cfengine agent
Group:		Monitoring
Requires:	%{name}-base = %{version}

%description cfagent
This package contain the cfengine agent.

%package cfservd
Summary:	Cfengine server daemon
Group:		Monitoring
Requires:	%{name}-base = %{version}
Requires(post):rpm-helper
Requires(preun):rpm-helper

%description cfservd
This package contain the cfengine server daemon.

%package cfexecd
Summary:	Cfengine agent execution wrapper
Group:		Monitoring
Requires:	%{name}-base = %{version}
Requires(post):	rpm-helper
Requires(preun):rpm-helper

%description cfexecd
This package contain the cfengine agent execution wrapper.

%package cfenvd
Summary:	Cfengine anomaly detection daemon
Group:		Monitoring
Requires:	%{name}-base = %{version}
Requires(pre):	rpm-helper
Requires(preun):rpm-helper

%description cfenvd
This package contain the cfengine anomaly detection daemon.

%prep
%setup -q
bzcat %{SOURCE1} > cfengine.conf
bzcat %{SOURCE2} > cfengine.cron
bzcat %{SOURCE3} > cfengine.sysinit
bzcat %{SOURCE4} > cfservd.init
bzcat %{SOURCE5} > cfexecd.init
bzcat %{SOURCE6} > cfenvd.init
chmod 644 inputs/*

%build
%serverbuild
%configure --with-workdir=%{_localstatedir}/%{name}
%make
cd doc
%make

%install
rm -rf %{buildroot}
%makeinstall
pushd doc
%makeinstall
popd

install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
install -d -m 755 %{buildroot}%{_sysconfdir}/cron.daily
install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
install -d -m 755 %{buildroot}%{_initrddir}
install -d -m 755 %{buildroot}%{_localstatedir}/%{name}
install -m 644 cfengine.conf %{buildroot}%{_sysconfdir}/%{name}/cfagent.conf
install -m 644 cfengine.sysinit %{buildroot}%{_sysconfdir}/sysconfig/cfengine
install -m 755 cfengine.cron %{buildroot}%{_sysconfdir}/cron.daily/cfengine
install -m 755 cfservd.init %{buildroot}%{_initrddir}/cfservd
install -m 755 cfexecd.init %{buildroot}%{_initrddir}/cfexecd
install -m 755 cfenvd.init %{buildroot}%{_initrddir}/cfenvd

# everything installed there is doc, actually
rm -rf %{buildroot}%{_datadir}/%{name}

%define info_files cfengine-Tutorial cfengine-Reference

%post base
for f in %{info_files}; do
	%_install_info $f
done
if [ $1 = 1 ]; then
	[ -f "%{_localstatedir}/%{name}/ppkeys/localhost.priv" ] || cfkey >/dev/null 2>&1
fi

%preun base
for f in %{info_files}; do
	%_remove_install_info $f
done

%post cfexecd
%_post_service cfexecd

%preun cfexecd
%_preun_service cfexecd

%post cfenvd
%_post_service cfenvd

%preun cfenvd
%_preun_service cfenvd

%post cfservd
%_post_service cfservd

%preun cfservd
%_preun_service cfservd

%clean
rm -rf %{buildroot}

%files base
%defattr(-,root,root)
%doc doc/*.{ps,pdf,html} inputs/*.example
%{_sbindir}/cfkey
%{_sbindir}/vicf
%{_sbindir}/cfshow
%{_sbindir}/cfdoc
%{_localstatedir}/%{name}
%{_mandir}/man*/cfkey.*
%{_mandir}/man*/cfshow.*
%{_mandir}/man*/cfengine.*
%{_infodir}/*

%files cfagent
%defattr(-,root,root)
%{_mandir}/man*/cfagent.*
%{_mandir}/man*/cfenvgraph.*
%{_mandir}/man*/cfrun.*
%{_sbindir}/cfagent
%{_sbindir}/cfenvgraph
%{_sbindir}/cfrun
%{_sysconfdir}/cron.daily/cfengine
%config(noreplace) %{_sysconfdir}/sysconfig/cfengine
%config(noreplace) %{_sysconfdir}/cfengine

%files cfservd
%defattr(-,root,root)
%{_initrddir}/cfservd
%{_sbindir}/cfservd
%{_mandir}/man*/cfservd.*

%files cfenvd
%defattr(-,root,root)
%{_initrddir}/cfenvd
%{_sbindir}/cfenvd
%{_mandir}/man*/cfenvd.*

%files cfexecd
%defattr(-,root,root)
%{_initrddir}/cfexecd
%{_sbindir}/cfexecd
%{_mandir}/man*/cfexecd.*

%changelog
* Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.15-2mdk
- fix rpmlint errors (PreReq)

* Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.1.15-1mdk
- 2.1.15
- fix rpmlint errors (PreReq) 

* Fri Apr 22 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.1.14-1mdk
- New release 2.1.14
- drop patches
- new subpackage split: base, cfagent, cfservd, cfexecd, cfenvd

* Tue Feb 08 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-7mdk 
- really fix cron script

* Mon Feb 07 2005 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.1.12-6mdk
- split cfservd into separate package
- fix config file location

* Thu Jan 20 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-5mdk 
- fix update.conf not executed (patch1, from upstream subversion)
- fix initscripts
- less arbitrary default configuration

* Tue Jan 18 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-4mdk 
- add service scripts for cfservd, cfenvd, cfexecd
- s/Linux Mandrake/Mandrakelinux/ in cron script (thx misc)

* Tue Jan 18 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-3mdk 
- set work dir to %{_localstatedir}/%{name}
- set backup to %{_localstatedir}/%{name}/backups
- autogen keys as postinstall

* Tue Jan 18 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-2mdk 
- switch to automake1.8
- drop cfd, no longer used
- fix cron task
- configuration for cron task in %{_sysconfdir}/sysinit/cfengine
- fix config file
- bzip2 additional files

* Fri Jan 14 2005 Guillaume Rousse <guillomovitch@mandrake.org> 2.1.12-1mdk 
- new version
- fix url
- exec in %{_sysconfdir} are not configuration
- drop patch 0, no more use
- spec cleanup
- use macros

* Tue Jun 08 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.6.5-4mdk
- force use of autoconf2.5 and automake1.4
- be sure to build everything in %%build (therefore run make twice)
- wipe out buildroot at the beginning of %%install
- fix permissions on docs
- update prereq on /sbin/chkconfig to rpm-helper
- cosmetics

* Mon Oct 13 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.6.5-3mdk
- fix build

* Fri May  2 2003 root <holm@theorie.physik.uni-goettingen.de> 1.6.5-2mdk
- Build requires: tetex-latex

* Thu Aug 15 2002 Juergen Holm <holm@theorie.physik.uni-goettingen.de> 1.6.5-1mdk
- Update to 1.6.5 to fix classes bug, and Checksumdatabase bug

* Fri Apr 26 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.6.3-8mdk
- Patch2: Fix build with gcc-3.1+. Don't include /usr/local/* in
  include and lib search path. Fix comment typo.

* Fri Feb 22 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-7mdk
- URL
- fixed installation of the doc

* Wed Nov 14 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-6mdk
- added texinfo and tetex-dvips to BuildRequires

* Sat Oct 13 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-5mdk
- recompile for db3.3

* Tue Jul  3 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-4mdk
- rebuild for db3.2

* Thu Mar 29 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-3mdk
- use the new rpm macros for servers.

* Mon Mar 26 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-2mdk
- stop cfd on uninstall

* Fri Mar 16 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.3-1mdk
- 1.6.3

* Wed Jan 17 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.2-1mdk
- new version

* Tue Jan  2 2001 Stefan van der Eijk <s.vandereijk@chello.nl> 1.6.1-2mdk
- fixed install

* Tue Jan  2 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.6.1-1mdk
- new version

* Thu Oct 12 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.5.4-5mdk
- Add security fix for syslog.

* Mon Aug 21 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.5.4-4mdk
- config files in noreplace mode.
- enable ssl

* Thu Jul 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.5.4-3mdk
- Move backups to /var/sppol.
- Merge debian patches.
- Recognize a Mandrake sysem.
- BM.

* Tue Jun  6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.5.4-2mdk
- Don't compile with SSL.

* Wed Mar  8 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.5.4-1mdk
- mandrake version.