+%bcond_without tcmalloc # tcmalloc allocator
+
+%ifarch x32
+%undefine with_tcmalloc
+%endif
Summary: Pound - reverse-proxy and load-balancer
Summary(pl.UTF-8): Pound - reverse-proxy i load-balancer
Name: pound
-Version: 2.4.4
-Release: 0.1
-License: GPL
+Version: 2.7
+Release: 3
+License: GPL v3
Group: Networking/Daemons
Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
-# Source0-md5: 013144a9fef3302d3691617aedc0d438
+# Source0-md5: ec8298aa3e4aee3ffbecdc0639d7f14a
+Source1: %{name}.cfg
+Source2: %{name}.init
+Source3: %{name}.sysconfig
+Source4: %{name}.logrotate
+Source5: %{name}.tmpfiles
Patch0: %{name}-hash-UL.patch
Patch1: %{name}-logfile.patch
Patch2: %{name}-daemonize.patch
Patch3: %{name}-log-notice.patch
Patch4: %{name}-man.patch
-Source1: %{name}.cfg
-Source2: %{name}.init
-Source3: %{name}.sysconfig
-Source4: %{name}.logrotate
URL: http://www.apsis.ch/pound/
BuildRequires: automake
+%{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: openssl-tools
BuildRequires: pcre-devel
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.644
Requires(post,preun): /sbin/chkconfig
Requires(postun): /usr/sbin/groupdel
Requires(postun): /usr/sbin/userdel
%build
cp -f /usr/share/automake/config.sub .
%configure \
- --with-maxbuf=2048
+ --enable-super \
+ --enable-pcreposix \
+ %{__enable_disable tcmalloc} \
+ --disable-hoard \
+ --with-maxbuf=6144
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
- $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}}
+ $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
+ $RPM_BUILD_ROOT%{systemdtmpfilesdir}
-install pound $RPM_BUILD_ROOT%{_sbindir}
-install poundctl $RPM_BUILD_ROOT%{_sbindir}
-install pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
-install poundctl.8 $RPM_BUILD_ROOT%{_mandir}/man8
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install -p pound $RPM_BUILD_ROOT%{_sbindir}
+install -p poundctl $RPM_BUILD_ROOT%{_sbindir}
+cp -p pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p poundctl.8 $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%{_mandir}/man8/*
+%{systemdtmpfilesdir}/%{name}.conf
%dir /var/run/%{name}
%dir %attr(751,root,root) /var/log/%{name}
%attr(750,root,root) %dir /var/log/archive/%{name}