LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cfengine.spec of Package cfengine (Project home:danci1973)

#
# spec file for package cfengine (Version 2.1.3)
#
# Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#

# norootforbuild
# neededforbuild  db db-devel openssl openssl-devel tcpd tetex

BuildRequires:  bison db-devel flex openssl-devel texlive

Name:         cfengine
License:      GPL
Group:        Productivity/Networking/System
Autoreqprov:  on
Version:      2.1.11
Release:      4
Summary:      A tool to maintain complicated networks
URL:          http://www.iu.hio.no/cfengine/
Source0:      %{name}-%{version}.tar.gz
Source1:      cfservd.init
Source2:      cfservd.sysconfig
Source3:      cfexecd.init
Source4:      cfexecd.sysconfig
Source5:      cfenvd.init
Source6:      cfenvd.sysconfig
Source7:      update.conf
Source8:      cfservd.conf
Patch:        %{name}-%{version}-ia64.dif
Patch3:       %{name}-%{version}-chflags.dif
Patch4:       %{name}-%{version}-automake.dif
Patch5:       %{name}-%{version}-strict-aliasing-fix.diff
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
PreReq:       %install_info_prereq
Patch6:		cfengine-nameinfo.partch
Patch7: 	cfengine-packages.diff
Patch8:		cfengine-%{version}-option-array.dif
Patch9:		cfengine-2.1.11-nopriv.dif

%description
GNU cfengine is an abstract programming language for system
administrators of huge heterogeneous networks. With cfengine, system
administrators have an easy and elegant way to maintain complicated
networks.



Authors:
--------
    Mark Burgess

%prep
%setup
%patch -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
#%patch6 -p1
#%patch7 -p1
%patch8 -p1
%patch9 -p1

%build
%{suse_update_config -f}
autoreconf -fi
CC=gcc CFLAGS="$RPM_OPT_FLAGS -D_FORTIFY_SOURCE=0" \
  ./configure --prefix=/usr \
              --with-docs \
              --mandir=%{_mandir} \
              --infodir=%{_infodir} \
              --datadir=%{_defaultdocdir} \
              --with-berkeleydb=/usr \
              --with-workdir=/var/lib/%{name}

make

%install
[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf  %{buildroot}
make "DESTDIR=$RPM_BUILD_ROOT" install
cd doc ; make "DESTDIR=$RPM_BUILD_ROOT" install

#mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/var/cfengine/inputs
#mkdir -p $RPM_BUILD_ROOT/var/cfengine/bin

install %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/cfservd
install %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/cfservd

install %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/cfexecd
install %{SOURCE4} $RPM_BUILD_ROOT/var/adm/fillup-templates/cfexecd

install %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/cfenvd
install %{SOURCE6} $RPM_BUILD_ROOT/var/adm/fillup-templates/cfenvd

install %{SOURCE7} $RPM_BUILD_ROOT/var/cfengine/inputs/update.conf
install %{SOURCE8} $RPM_BUILD_ROOT/var/cfengine/inputs/cfservd.conf

#cp $RPM_BUILD_ROOT/usr/sbin/* $RPM_BUILD_ROOT/var/cfengine/bin

ln -sf /etc/init.d/cfexecd $RPM_BUILD_ROOT/usr/sbin/rccfexecd
ln -sf /etc/init.d/cfservd $RPM_BUILD_ROOT/usr/sbin/rccfservd

%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf  %{buildroot}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Anomalies.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz

#if [ ! -f /var/lib/cfengine/ppkeys/localhost.priv ]; then
#	/usr/sbin/cfkey
#fi

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Anomalies.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz

%preun
%stop_on_removal cfenvd
%stop_on_removal cfservd
%stop_on_removal cfexecd

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README COPYING TODO inputs/*.example
%attr(0600,root,root) %config(noreplace) /var/cfengine/inputs/*
/var/adm/fillup-templates/*
%dir /var/cfengine
#%dir /var/cfengine/bin
%dir /var/cfengine/inputs
/usr/sbin/rccfexecd
/usr/sbin/rccfservd
/usr/sbin/*
/etc/init.d/*
#/var/cfengine/bin/*
%doc %{_mandir}/man?/*
%doc %{_infodir}/*.info*

%changelog -n cfengine
* Wed Feb 18 2004 - postadal@suse.cz
- updated to version 2.1.3
- removed obsoleted patch db.dif
- fixed code that broke strict aliasing
* Fri Jan 23 2004 - ro@suse.de
- fix build with current automake
  use another method to pass flags to MAKEINFOHTML
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Wed Aug 06 2003 - postadal@suse.cz
- updated to version 2.0.7p3
- removed obsoleted patch (info.diff)
* Mon May 12 2003 - ro@suse.de
- fix build with db-4.1
- fix compile: chflags function available does not mean
  struct stat has st_flags
* Thu Apr 24 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
* Wed Feb 26 2003 - postadal@suse.cz
- used install-info macros
- fixed Anomalies.texinfo (dir entry)
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Wed Jul 31 2002 - postadal@suse.cz
- update to version 2.0.3
  * Hpux config changes
  * new options
  * new list in cfservd.conf
  * a lot of fixes
* Fri Nov 23 2001 - cihlar@suse.cz
- added Url:
* Mon Nov 05 2001 - cihlar@suse.cz
- fixed to compile with automake 1.5
* Mon Apr 23 2001 - cihlar@suse.cz
- fixed warnings on ia64
* Tue Mar 06 2001 - cihlar@suse.cz
- update to version 1.6.3
* Mon Oct 30 2000 - cihlar@suse.cz
- update to version 1.6.0.a13
- bzipped sources
* Tue Oct 03 2000 - cihlar@suse.cz
- update to version 1.6.0.a11
* Mon May 15 2000 - cihlar@suse.cz
- Group sorted
- %%{_defaultdocdir} instead of /usr/doc/packages
* Mon Apr 10 2000 - bk@suse.de
- added suse update config macro
* Tue Apr 04 2000 - cihlar@suse.cz
- upgrade to version 1.5.4
- added BuildRoot
* Mon Jan 17 2000 - ro@suse.de
- update to 1.5.3 , man, info to /usr/share
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Sep 01 1999 - ro@suse.de
- update to 1.5.1 / specfile cleanup
* Tue Sep 22 1998 - ro@suse.de
- update to 1.4.12
* Mon Mar 02 1998 - florian@suse.de
- update to release 1.4.10
* Fri Oct 10 1997 - florian@suse.de
- update to release 1.4.8a
* Mon Jul 07 1997 - florian@suse.de
- update to release 1.4.0
* Thu Jan 02 1997 - florian@suse.de
- update to newest version 1.3.16
* Thu Jan 02 1997 - florian@suse.de
- Update auf neue Version 1.3.12.