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: c0f5af4cd6aa184c00f4848ae1c4536a
17 Source3: %{name}.sysconfig
18 Source5: %{name}.tmpfiles
19 Patch0: tcmalloc.patch
20 Patch1: pound-man.patch
21 Patch2: mbedtls3.patch
22 URL: https://www.apsis.ch/pound.html
24 BuildRequires: yaml-devel
25 BuildRequires: nanomsg-devel
26 BuildRequires: mbedtls-devel
27 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
28 BuildRequires: pcre-devel
29 BuildRequires: rpmbuild(macros) >= 1.644
30 Requires(post,preun): /sbin/chkconfig
31 Requires(postun): /usr/sbin/groupdel
32 Requires(postun): /usr/sbin/userdel
33 Requires(pre): /bin/id
34 Requires(pre): /usr/bin/getgid
35 Requires(pre): /usr/sbin/groupadd
36 Requires(pre): /usr/sbin/useradd
39 Provides: group(pound)
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _sysconfdir /etc/pound
46 The Pound program is a reverse proxy, load balancer and HTTPS
47 front-end for Web server(s). Pound was developped to enable
48 distributing the load among several Web-servers and to allow for a
49 convenient SSL wrapper for those Web servers that do not offer it
50 natively. Pound is distributed under the GPL - no warranty, it's free
51 to use, copy and give away.
53 %description -l pl.UTF-8
54 Program Pound jest odwrotnym proxy, load-balancerem i interfejsem
55 HTTPS do serwera(ów) WWW. Pount został stworzony by pozwolić na
56 rozdzielenie obciążenia na kilka serwerów WWW i pozwolić na wygodne
57 opakowanie SSL-em tych serwerów, które same nie obsługują SSL. Pound
58 jest rozpowszechniany na licencji GPL - bez gwarancji, z możliwością
59 swobodnego używania, kopiowania i rozdawania.
62 %setup -q -n Pound-%{version}
71 %{?with_tcmalloc:-DWANT_TCMALLOC:BOOL=ON}
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,rc.d/init.d}} \
77 $RPM_BUILD_ROOT/var/run/%{name} \
78 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
80 install -p build/pound $RPM_BUILD_ROOT%{_sbindir}
81 cp -p man/pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
82 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
83 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
84 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
85 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
88 rm -rf $RPM_BUILD_ROOT
91 %groupadd -g 200 %{name}
92 %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
95 /sbin/chkconfig --add %{name}
96 %service %{name} restart "Pound Daemon"
99 if [ "$1" = "0" ]; then
100 %service %{name} stop
101 /sbin/chkconfig --del %{name}
105 if [ "$1" = "0" ]; then
111 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_sbindir}/pound
115 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.yaml
116 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
117 %attr(754,root,root) /etc/rc.d/init.d/%{name}
119 %{systemdtmpfilesdir}/%{name}.conf
120 %dir /var/run/%{name}