# # spec file for package cfengine (Version 3.0.5p1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: cfengine BuildRequires: bison db-devel flex mysql-devel openssl-devel pcre-devel texlive License: GPLv2+ Group: Productivity/Networking/System AutoReqProv: on Version: 3.0.5p1 Release: 1 Summary: A Tool to Maintain Complicated Networks Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.bz2 Source2: cf-monitord Source3: cf-execd Source4: cf-serverd BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %install_info_prereq %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 -q %build %{suse_update_config -f} autoreconf -fi CC=gcc CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --datadir=/var/lib/cfengine/inputs \ --docdir=%{_docdir}/cfengine \ --with-workdir=/var/lib/cfengine make %install make "DESTDIR=$RPM_BUILD_ROOT" install install -d $RPM_BUILD_ROOT/{usr/sbin,etc/init.d} install -m 744 %{S:2} %{S:3} %{S:4} $RPM_BUILD_ROOT/etc/init.d/ ln -sf ../../etc/init.d/cf-monitord $RPM_BUILD_ROOT/%{_sbindir}/rccf-monitord ln -sf ../../etc/init.d/cf-execd $RPM_BUILD_ROOT/%{_sbindir}/rccf-execd ln -sf ../../etc/init.d/cf-serverd $RPM_BUILD_ROOT/%{_sbindir}/rccf-serverd mkdir -p $RPM_BUILD_ROOT/var/lib/cfengine/bin ln -sf ../../../../usr/sbin/cf-promises $RPM_BUILD_ROOT/var/lib/cfengine/bin/cf-promises rm -rf $RPM_BUILD_ROOT/%{_libdir}/libpromises.la rm -rf $RPM_BUILD_ROOT/%{_libdir}/libpromises.a mkdir -p $RPM_BUILD_ROOT/var/lib/cfengine/inputs/ cp $RPM_BUILD_ROOT/usr/share/doc/packages/cfengine/inputs/* $RPM_BUILD_ROOT/var/lib/cfengine/inputs/ chmod 0644 $RPM_BUILD_ROOT/var/lib/cfengine/inputs/* %clean [ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} %post %install_info --name=cfengine --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %postun %install_info_delete --name=cfengine --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %insserv_cleanup %preun %stop_on_removal cf-monitord %stop_on_removal cf-serverd %stop_on_removal cf-execd %files %defattr(-,root,root) %doc AUTHORS ChangeLog README COPYING /usr/sbin/* %{_mandir}/man?/* %dir /var/lib/cfengine /var/lib/cfengine/* %config(noreplace) /var/lib/cfengine/inputs/* %attr(0755,root,root) %config /etc/init.d/* %changelog