Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37764138
en ru br
ALT Linux repos
5.0: 2.2.8-alt1
4.1: 2.2.1-alt1.1
4.0: 2.1.22-alt2.1

Group :: Monitoring
RPM: cfengine

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define name cfengine
%define cfport 5308
%add_findreq_skiplist *emacs*
%add_findreq_skiplist *cfdoc*

Summary: Cfengine helps administer remote BSD and System-5-like systems
Name: %name
Version: 2.2.1
Release: alt1.1
Group: Monitoring
License: GPL
Url: http://www.cfengine.org
Packager: Evgenii Terechkov <evg at altlinux.ru>

Source0: %name-%version.tar.gz
Source1: cfenvd
Source2: cfexecd
Source3: cfservd

Obsoletes: %name-cfservd
# AutoReq: yes, noperl

# Automatically added by buildreq on Mon May 28 2007

BuildRequires: flex libacl-devel libdb4-devel libpcre-devel libssl-devel tetex-dvips tetex-latex

BuildPreReq: emacs-devel

%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.

Documentation is man pages only. For other formats, look
cfengine-{html,pdf,info}-doc packages.

Recommends: perl-base emacs-base

%package html-doc
Summary: Cfengine helps administer remote BSD and System-5-like systems. HTML documentation
Group: Monitoring

%package pdf-doc
Summary: Cfengine helps administer remote BSD and System-5-like systems. PDF documentation
Group: Monitoring

%package info
Summary: Cfengine helps administer remote BSD and System-5-like systems. GNU Info documentation
Group: Monitoring

%description html-doc
Cfengine helps administer remote BSD and System-5-like systems. HTML documentation

%description pdf-doc
Cfengine helps administer remote BSD and System-5-like systems. PDF documentation

%description info
Cfengine helps administer remote BSD and System-5-like systems. GNU Info documentation

%prep
%setup -q

%build
%__autoreconf
%configure --prefix=%_prefix --mandir=%_mandir --infodir=%_infodir --with-docs --with-pcre --with-workdir=%_sysconfdir/%name
%make

%install
%__mkdir_p %buildroot%_initdir
for i in %SOURCE1 %SOURCE2 %SOURCE3
do
       %__install -p -m755 $i %buildroot%_initdir
done

%make DESTDIR=%buildroot install install-man install-info
%__chmod 444 inputs/*.example

%__rm -fv -- %buildroot%_infodir/dir

%__mkdir_p \
       %buildroot%_sysconfdir/%name/bin %buildroot%_sysconfdir/%name/inputs \
       %buildroot%_sysconfdir/%name/modules %buildroot%_sysconfdir/%name/outputs \
       %buildroot%_sysconfdir/%name/ppkeys %buildroot%_sysconfdir/%name/rpc_in \
       %buildroot%_sysconfdir/%name/rpc_out %buildroot%_sysconfdir/%name/state

%__install -D -m 644 contrib/%name.el %buildroot%_emacs_sitestart_dir/%name.el

cd %buildroot%_sbindir
for i in *
do
       %__ln_s -- "$(relative "%_sbindir/$i" "%_sysconfdir/%name/bin/$i")" "%buildroot%_sysconfdir/%name/bin"
done

%post
# This break ALT policy:
# %__grep -E '^%name.+%cfport/tcp' %_sysconfdir/services >/dev/null 2>&1 || echo "%name %cfport/tcp # CFengine" >> %_sysconfdir/services

%post_service cfenvd
%post_service cfexecd
%post_service cfservd

if [ ! -e %_sysconfdir/%name/ppkeys/localhost.priv ]; then
       %_sbindir/cfkey
fi

%post -n  %name-info
%install_info %name-Anomalies.info
%install_info %name-Reference.info
%install_info %name-Tutorial.info

%preun -n  %name-info
%uninstall_info %name-Anomalies.info
%uninstall_info %name-Reference.info
%uninstall_info %name-Tutorial.info

%preun
%preun_service cfexecd
%preun_service cfenvd
%preun_service cfservd

%files
%_emacs_sitestart_dir/%name.el
%_initdir/*
%_man8dir/*
%defattr(-, root, root, 0700)
%_sysconfdir/%name

%_sbindir/*

%defattr(644,root,root,755)
%doc ChangeLog INSTALL NEWS README inputs/*.example

%files html-doc
%doc doc/*.htm*

%files pdf-doc
%doc doc/*.pdf

%files info
%_infodir/*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin