1 # NOTE: pound 3.x has been withdrawn; for pound 4.x (based on fork from pound 2.8)
2 # see pound-4 branch - to be tested and merged
5 %bcond_without tcmalloc # tcmalloc allocator
8 %undefine with_tcmalloc
10 Summary: Pound - reverse-proxy and load-balancer
11 Summary(pl.UTF-8): Pound - odwrotne proxy i load-balancer
16 Group: Networking/Daemons
17 Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
18 # Source0-md5: c0f5af4cd6aa184c00f4848ae1c4536a
21 Source3: %{name}.sysconfig
22 Source5: %{name}.tmpfiles
23 Patch0: tcmalloc.patch
24 Patch1: pound-man.patch
25 Patch2: mbedtls3.patch
26 URL: https://github.com/graygnuorg/pound
27 BuildRequires: cmake >= 3.0
28 %{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
29 BuildRequires: mbedtls-devel
30 BuildRequires: nanomsg-devel
31 BuildRequires: pcre2-8-devel
32 BuildRequires: pcre2-posix-devel
33 BuildRequires: rpmbuild(macros) >= 1.644
34 BuildRequires: yaml-devel
35 Requires(post,preun): /sbin/chkconfig
36 Requires(postun): /usr/sbin/groupdel
37 Requires(postun): /usr/sbin/userdel
38 Requires(pre): /bin/id
39 Requires(pre): /usr/bin/getgid
40 Requires(pre): /usr/sbin/groupadd
41 Requires(pre): /usr/sbin/useradd
44 Provides: group(pound)
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %define _sysconfdir /etc/pound
51 The Pound program is a reverse proxy, load balancer and HTTPS
52 front-end for Web server(s). Pound was developped to enable
53 distributing the load among several Web-servers and to allow for a
54 convenient SSL wrapper for those Web servers that do not offer it
55 natively. Pound is distributed under the GPL - no warranty, it's free
56 to use, copy and give away.
58 %description -l pl.UTF-8
59 Program Pound jest odwrotnym proxy, load-balancerem i interfejsem
60 HTTPS do serwera(ów) WWW. Pount został stworzony by pozwolić na
61 rozdzielenie obciążenia na kilka serwerów WWW i pozwolić na wygodne
62 opakowanie SSL-em tych serwerów, które same nie obsługują SSL. Pound
63 jest rozpowszechniany na licencji GPL - bez gwarancji, z możliwością
64 swobodnego używania, kopiowania i rozdawania.
67 %setup -q -n Pound-%{version}
76 %{?with_tcmalloc:-DWANT_TCMALLOC:BOOL=ON}
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,rc.d/init.d}} \
82 $RPM_BUILD_ROOT/var/run/%{name} \
83 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
85 install -p build/pound $RPM_BUILD_ROOT%{_sbindir}
86 cp -p man/pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
87 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
88 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
89 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
90 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
93 rm -rf $RPM_BUILD_ROOT
96 %groupadd -g 200 %{name}
97 %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
100 /sbin/chkconfig --add %{name}
101 %service %{name} restart "Pound Daemon"
104 if [ "$1" = "0" ]; then
105 %service %{name} stop
106 /sbin/chkconfig --del %{name}
110 if [ "$1" = "0" ]; then
116 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_sbindir}/pound
120 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.yaml
121 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
122 %attr(754,root,root) /etc/rc.d/init.d/%{name}
123 %{_mandir}/man8/pound.8*
124 %{systemdtmpfilesdir}/%{name}.conf
125 %dir /var/run/%{name}