File pound.spec of Package pound

#
# spec file for package pound
#
# Copyright (c) 2012 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/
#


Name:           pound
BuildRequires:  openssl-devel
Summary:        Reverse-Proxy and Load-Balancer
License:        SUSE-GPL-3.0+-with-openssl-exception
Group:          Productivity/Networking/Web/Proxy
Url:            http://www.apsis.ch/pound/
Version:        2.6
Release:        0
Source0:        http://www.apsis.ch/pound/Pound-%version.tgz
Source1:        pound.cfg
Source2:        init.pound
Patch:          pound.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         pwdutils %insserv_prereq

%description
The Pound program is a reverse proxy, load balancer and HTTPS front-end
for Web server(s). Pound was developed to enable distributing the load
among several Web-servers and to allow for a convenient SSL wrapper for
those Web servers that do not offer it natively.



Authors:
--------
    Robert Segall <roseg@apsis.ch>

%package doc
Summary:        Doumentation for pound
Group:          Documentation/Other

%description doc
The Pound program is a reverse proxy, load balancer and HTTPS front-end
for Web server(s). Pound was developed to enable distributing the load
among several Web-servers and to allow for a convenient SSL wrapper for
those Web servers that do not offer it natively.

This package contains the documentation for pound.



Authors:
--------
    Robert Segall <roseg@apsis.ch>

%prep
%setup -q -n Pound-%version
%patch

%build
%configure \
  --enable-msdav \
  --with-ssl=/usr/include/openssl \
  --with-owner=pound \
  --with-group=pound
make %{?jobs:-j%jobs}

%install
%makeinstall
# Install pound init script
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0744 %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/pound
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/etc/pound.cfg
ln -sf ../../etc/init.d/pound $RPM_BUILD_ROOT/usr/sbin/rcpound
mkdir -p %buildroot%_defaultdocdir/%name/examples
install -m644 GPL.txt README FAQ %buildroot%_defaultdocdir/%name/
install -m755 z2_2_5_1.py z2_2_6_1.py %buildroot%_defaultdocdir/%name/examples/ 

%clean
rm -rf ${RPM_BUILD_ROOT}

%pre
# Add the "pound" user and group
%{_sbindir}/groupadd -r pound 2> /dev/null || :
%{_sbindir}/useradd -c "Pound" -g pound -r -d /var/lib/pound pound 2> /dev/null || :

%post
%{fillup_and_insserv -f -n pound pound}

%postun
%restart_on_update pound
%insserv_cleanup

%preun
%stop_on_removal pound

%files
%defattr(-,root,root)
%doc %_defaultdocdir/%name/GPL.txt
/etc/init.d/pound
%attr(555, root, root) /usr/sbin/pound
%attr(555, root, root) /usr/sbin/poundctl
/usr/sbin/rcpound
%_mandir/man8/pound.8.gz
%_mandir/man8/poundctl.8.gz
%config(noreplace) /etc/pound.cfg

%files doc
%defattr(-,root,root) 
%doc %_defaultdocdir/%name
%exclude %_defaultdocdir/%name/GPL.txt

%changelog
openSUSE Build Service is sponsored by