1 %bcond_without tcmalloc # tcmalloc allocator
4 %undefine with_tcmalloc
6 Summary: Pound - reverse-proxy and load-balancer
7 Summary(pl.UTF-8): Pound - reverse-proxy i load-balancer
12 Group: Networking/Daemons
13 Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
14 # Source0-md5: ec8298aa3e4aee3ffbecdc0639d7f14a
17 Source3: %{name}.sysconfig
18 Source4: %{name}.logrotate
19 Source5: %{name}.tmpfiles
20 Patch0: %{name}-hash-UL.patch
21 Patch1: %{name}-logfile.patch
22 Patch2: %{name}-daemonize.patch
23 Patch3: %{name}-log-notice.patch
24 Patch4: %{name}-man.patch
25 URL: http://www.apsis.ch/pound/
26 BuildRequires: automake
27 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
28 BuildRequires: openssl-devel >= 0.9.7d
29 BuildRequires: openssl-tools
30 BuildRequires: pcre-devel
31 BuildRequires: rpmbuild(macros) >= 1.644
32 Requires(post,preun): /sbin/chkconfig
33 Requires(postun): /usr/sbin/groupdel
34 Requires(postun): /usr/sbin/userdel
35 Requires(pre): /bin/id
36 Requires(pre): /usr/bin/getgid
37 Requires(pre): /usr/sbin/groupadd
38 Requires(pre): /usr/sbin/useradd
41 Provides: group(pound)
43 Conflicts: logrotate < 3.7-4
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _sysconfdir /etc/pound
49 The Pound program is a reverse proxy, load balancer and HTTPS
50 front-end for Web server(s). Pound was developped to enable
51 distributing the load among several Web-servers and to allow for a
52 convenient SSL wrapper for those Web servers that do not offer it
53 natively. Pound is distributed under the GPL - no warranty, it's free
54 to use, copy and give away.
56 %description -l pl.UTF-8
57 Program Pound jest odwrotnym proxy, load-balancerem i interfejsem
58 HTTPS do serwera(ów) WWW. Pount został stworzony by pozwolić na
59 rozdzielenie obciążenia na kilka serwerów WWW i pozwolić na wygodne
60 opakowanie SSL-em tych serwerów, które same nie obsługują SSL. Pound
61 jest rozpowszechniany na licencji GPL - bez gwarancji, z możliwością
62 swobodnego używania, kopiowania i rozdawania.
65 %setup -q -n Pound-%{version}
73 cp -f /usr/share/automake/config.sub .
77 %{__enable_disable tcmalloc} \
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
85 $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
86 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
88 install -p pound $RPM_BUILD_ROOT%{_sbindir}
89 install -p poundctl $RPM_BUILD_ROOT%{_sbindir}
90 cp -p pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
91 cp -p poundctl.8 $RPM_BUILD_ROOT%{_mandir}/man8
92 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
93 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
94 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
95 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
96 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
99 rm -rf $RPM_BUILD_ROOT
102 %groupadd -g 200 %{name}
103 %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
106 for a in access.log pound.log; do
107 if [ ! -f /var/log/%{name}/$a ]; then
108 touch /var/log/%{name}/$a
109 chown pound:pound /var/log/%{name}/$a
110 chmod 644 /var/log/%{name}/$a
113 /sbin/chkconfig --add %{name}
114 %service %{name} restart "Pound Daemon"
117 if [ "$1" = "0" ]; then
118 %service %{name} stop
119 /sbin/chkconfig --del %{name}
123 if [ "$1" = "0" ]; then
129 %defattr(644,root,root,755)
130 %doc README FAQ CHANGELOG z*.py
131 %attr(755,root,root) %{_sbindir}/pound
132 %attr(755,root,root) %{_sbindir}/poundctl
134 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.cfg
135 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
137 %attr(754,root,root) /etc/rc.d/init.d/%{name}
139 %{systemdtmpfilesdir}/%{name}.conf
140 %dir /var/run/%{name}
141 %dir %attr(751,root,root) /var/log/%{name}
142 %attr(750,root,root) %dir /var/log/archive/%{name}