File spreadlogd.spec of Package spreadlogd

#
# spec file for package spreadlogd (Version 2.0.0)
#
# 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:           spreadlogd
Version:        2.0.0
Release:        10
Summary:        A replacement to log_writer
Group:          System Environment/Daemons
License:        Apache Software License
URL:            http://www.backhand.org/mod_log_spread/
#URL:            https://labs.omniti.com/trac/spreadlogd
# see also http://osdir.com/ml/apache.mod-backhand.general/2007-09/msg00000.html

# http://www.backhand.org/mod_log_spread/spreadlogd.tar.gz -> "spreadlogd-2.0.0" from 2006
Source:         http://www.backhand.org/mod_log_spread/%{name}.tar.gz
Source1:	spreadlogd.init
Patch:          spreadlogd-2.0.0-perl-compile.patch
PreReq:         pwdutils %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#BuildRequires:  flex, bison, spread, gcc, byacc, libevent-devel
BuildRequires:  spread-devel libevent flex bison
Requires:       spread

%description
a replacement to log_writer

%prep
%setup -n %{name}-%{version}
%patch -p1

%build
export CFLAGS="%{optflags}" CPPFLAGS="%{optflags}"
%configure
%{__make}

%install
%makeinstall
#
# install the init script
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
#
%{__mv} %{buildroot}%{_sysconfdir}/spreadlogd.conf.sample \
        %{buildroot}%{_sysconfdir}/spreadlogd.conf

%files
%defattr(-,root,root)
%{_sbindir}/*
%config %{_sysconfdir}/init.d/spreadlogd
%config(noreplace) %{_sysconfdir}/spreadlogd.conf


%clean
%{__rm} -rf "%{buildroot}"

%preun
%stop_on_removal %{name}

%post
%fillup_and_insserv -f %{name}

%postun
%insserv_cleanup
%restart_on_update %{name}

%changelog
openSUSE Build Service is sponsored by