2 # - precise texinfo deps
5 Summary: A systems administration tool for networks
10 Group: Applications/System
11 Source0: http://www.cfengine.org/tarballs/%{name}-%{version}.tar.gz
12 # Source0-md5: b74af23928253e11dcce3d98510f1066
16 URL: http://www.cfengine.org/
17 BuildRequires: acl-devel
19 BuildRequires: db-devel
21 BuildRequires: libselinux-devel
23 BuildRequires: openssl-devel
24 BuildRequires: pcre-devel
25 BuildRequires: tetex-dvips
26 Requires(post,preun): /sbin/chkconfig
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Cfengine, or the configuration engine is an agent/software robot and a
32 very high level language for building expert systems to administrate
33 and configure large computer networks. Cfengine uses the idea of
34 classes and a primitive form of intelligence to define and automate
35 the configuration and maintenance of system state, for small to huge
36 configurations. Cfengine is designed to be a part of a computer immune
40 Summary: Documentation for cfengine
42 Requires: %{name} = %{version}-%{release}
45 This package contains the documentation for cfengine.
52 BERKELEY_DB_LIB=-ldb \
53 --docdir=%{_docdir}/%{name}-%{version} \
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/%{name}}
61 DESTDIR=$RPM_BUILD_ROOT
63 # make directory tree for cfengine configs
64 install -d $RPM_BUILD_ROOT%{_var}/%{name}
65 for i in ppkeys inputs outputs; do
66 mkdir -m 0700 $RPM_BUILD_ROOT%{_var}/%{name}/$i
69 # It's ugly, but thats the way Mark wants to have it. :(
70 # If we don't create this link, cfexecd will not be able to start
71 # (hardcoded) /var/sbin/cf-agent in scheduled intervals. Other option
72 # would be to patch cfengine to use %{_sbindir}/cf-agent
73 # but upstream won't support this
74 install -d $RPM_BUILD_ROOT%{_var}/%{name}/bin
75 ln -sf %{_sbindir}/cf-agent $RPM_BUILD_ROOT%{_var}/%{name}/bin
76 ln -sf %{_sbindir}/cf-promises $RPM_BUILD_ROOT%{_var}/%{name}/bin
79 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
80 for i in %{SOURCE1} %{SOURCE2} %{SOURCE3}; do
81 install -p -m 0755 $i $RPM_BUILD_ROOT/etc/rc.d/init.d
84 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
86 # All this stuff is pushed into doc/contrib directories
87 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}
88 rm -f $RPM_BUILD_ROOT%{_sbindir}/cfdoc
91 rm -rf $RPM_BUILD_ROOT
94 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
96 # cfagent won't run nicely, unless your host has keys.
97 if [ ! -d /mnt/sysimage -a ! -f %{_var}/%{name}/ppkeys/localhost.priv ]; then
98 %{_sbindir}/cf-key >/dev/null || :
101 # add init files to chkconfig
102 /sbin/chkconfig --add cf-monitord
103 /sbin/chkconfig --add cf-execd
104 /sbin/chkconfig --add cf-serverd
105 %service cf-monitord restart
106 %service cf-execd restart
107 %service cf-serverd restart
110 if [ "$1" = "0" ]; then
111 %service cf-monitord stop
112 %service cf-execd stop
113 %service cf-serverd stop
114 /sbin/chkconfig --del cf-monitord
115 /sbin/chkconfig --del cf-execd
116 /sbin/chkconfig --del cf-serverd
120 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
123 %defattr(644,root,root,755)
124 %doc AUTHORS ChangeLog README TODO
125 %attr(755,root,root) %{_sbindir}/*
126 %{_libdir}/libpromises*
128 %attr(754,root,root) /etc/rc.d/init.d/cf-monitord
129 %attr(754,root,root) /etc/rc.d/init.d/cf-execd
130 %attr(754,root,root) /etc/rc.d/init.d/cf-serverd
134 %defattr(644,root,root,755)