cfengine/cfengine.spec
OBS User autobuild e171d212f8 Accepting request 26422 from systemmanagement
Copy from systemmanagement/cfengine based on submit request 26422 from user anicka

OBS-URL: https://build.opensuse.org/request/show/26422
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cfengine?expand=0&rev=17
2009-12-16 16:43:19 +00:00

106 lines
3.4 KiB
RPMSpec

#
# spec file for package cfengine (Version 3.0.2)
#
# Copyright (c) 2009 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.2
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 docs/cf3-Reference.pdf docs/ContributorStatement.pdf
/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