3 %bcond_without tcmalloc # tcmalloc allocator
6 %undefine with_tcmalloc
8 Summary: Pound - reverse-proxy and load-balancer
9 Summary(pl.UTF-8): Pound - odwrotne proxy i load-balancer
14 Group: Networking/Daemons
15 Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
16 # Source0-md5: c0f5af4cd6aa184c00f4848ae1c4536a
19 Source3: %{name}.sysconfig
20 Source5: %{name}.tmpfiles
21 Patch0: tcmalloc.patch
22 Patch1: pound-man.patch
23 Patch2: mbedtls3.patch
24 URL: https://www.apsis.ch/pound.html
25 BuildRequires: cmake >= 3.0
26 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
27 BuildRequires: mbedtls-devel
28 BuildRequires: nanomsg-devel
29 BuildRequires: pcre2-8-devel
30 BuildRequires: pcre2-posix-devel
31 BuildRequires: rpmbuild(macros) >= 1.644
32 BuildRequires: yaml-devel
33 Requires(post,preun): /sbin/chkconfig
34 Requires(postun): /usr/sbin/groupdel
35 Requires(postun): /usr/sbin/userdel
36 Requires(pre): /bin/id
37 Requires(pre): /usr/bin/getgid
38 Requires(pre): /usr/sbin/groupadd
39 Requires(pre): /usr/sbin/useradd
42 Provides: group(pound)
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}
74 %{?with_tcmalloc:-DWANT_TCMALLOC:BOOL=ON}
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,rc.d/init.d}} \
80 $RPM_BUILD_ROOT/var/run/%{name} \
81 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
83 install -p build/pound $RPM_BUILD_ROOT%{_sbindir}
84 cp -p man/pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
85 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
86 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
87 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
88 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
91 rm -rf $RPM_BUILD_ROOT
94 %groupadd -g 200 %{name}
95 %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
98 /sbin/chkconfig --add %{name}
99 %service %{name} restart "Pound Daemon"
102 if [ "$1" = "0" ]; then
103 %service %{name} stop
104 /sbin/chkconfig --del %{name}
108 if [ "$1" = "0" ]; then
114 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_sbindir}/pound
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.yaml
119 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
120 %attr(754,root,root) /etc/rc.d/init.d/%{name}
121 %{_mandir}/man8/pound.8*
122 %{systemdtmpfilesdir}/%{name}.conf
123 %dir /var/run/%{name}