]>
Commit | Line | Data |
---|---|---|
95d418a4 JR |
1 | %bcond_without tcmalloc # tcmalloc allocator |
2 | ||
3 | %ifarch x32 | |
4 | %undefine with_tcmalloc | |
5 | %endif | |
73807a5d | 6 | Summary: Pound - reverse-proxy and load-balancer |
7fbec31c | 7 | Summary(pl.UTF-8): Pound - reverse-proxy i load-balancer |
73807a5d | 8 | Name: pound |
875c35e0 JR |
9 | Version: 3.0.2 |
10 | Release: 1 | |
361f3ee8 | 11 | License: GPL v3 |
73807a5d | 12 | Group: Networking/Daemons |
73807a5d | 13 | Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz |
875c35e0 | 14 | # Source0-md5: c0f5af4cd6aa184c00f4848ae1c4536a |
6477195c | 15 | Source1: %{name}.yaml |
8a12d360 JR |
16 | Source2: %{name}.init |
17 | Source3: %{name}.sysconfig | |
8a12d360 | 18 | Source5: %{name}.tmpfiles |
6477195c JR |
19 | Patch0: tcmalloc.patch |
20 | Patch1: pound-man.patch | |
875c35e0 JR |
21 | Patch2: mbedtls3.patch |
22 | URL: https://www.apsis.ch/pound.html | |
6477195c JR |
23 | BuildRequires: cmake |
24 | BuildRequires: yaml-devel | |
25 | BuildRequires: nanomsg-devel | |
26 | BuildRequires: mbedtls-devel | |
95d418a4 | 27 | %{?with_tcmalloc:BuildRequires: libtcmalloc-devel} |
f8a55c4f | 28 | BuildRequires: pcre-devel |
0453b2b1 | 29 | BuildRequires: rpmbuild(macros) >= 1.644 |
6e57d9ed | 30 | Requires(post,preun): /sbin/chkconfig |
5474a5a6 ER |
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 | |
767184e8 | 37 | Requires: pcre >= 7.8 |
2dbe9c52 | 38 | Requires: rc-scripts |
5474a5a6 ER |
39 | Provides: group(pound) |
40 | Provides: user(pound) | |
73807a5d | 41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
9df600c4 ER |
43 | %define _sysconfdir /etc/pound |
44 | ||
73807a5d | 45 | %description |
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. | |
52 | ||
ebd232a4 | 53 | %description -l pl.UTF-8 |
f8243939 | 54 | Program Pound jest odwrotnym proxy, load-balancerem i interfejsem |
ebd232a4 JR |
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. | |
f8243939 | 60 | |
73807a5d | 61 | %prep |
fd0369ad | 62 | %setup -q -n Pound-%{version} |
9df600c4 ER |
63 | %patch0 -p1 |
64 | %patch1 -p1 | |
875c35e0 | 65 | %patch2 -p1 |
73807a5d | 66 | |
67 | %build | |
6477195c JR |
68 | install -d build |
69 | cd build | |
70 | %cmake ../ \ | |
71 | %{?with_tcmalloc:-DWANT_TCMALLOC:BOOL=ON} | |
9df600c4 | 72 | %{__make} |
73807a5d | 73 | |
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
6477195c JR |
76 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,rc.d/init.d}} \ |
77 | $RPM_BUILD_ROOT/var/run/%{name} \ | |
0453b2b1 | 78 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
73807a5d | 79 | |
6477195c JR |
80 | install -p build/pound $RPM_BUILD_ROOT%{_sbindir} |
81 | cp -p man/pound.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
b329097e ER |
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} | |
e6ba7a2a | 85 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
8a12d360 | 86 | |
6e57d9ed JB |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
5474a5a6 ER |
90 | %pre |
91 | %groupadd -g 200 %{name} | |
92 | %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name} | |
93 | ||
73807a5d | 94 | %post |
95 | /sbin/chkconfig --add %{name} | |
5474a5a6 | 96 | %service %{name} restart "Pound Daemon" |
73807a5d | 97 | |
98 | %preun | |
cfc0cb59 ER |
99 | if [ "$1" = "0" ]; then |
100 | %service %{name} stop | |
101 | /sbin/chkconfig --del %{name} | |
73807a5d | 102 | fi |
73807a5d | 103 | |
5474a5a6 ER |
104 | %postun |
105 | if [ "$1" = "0" ]; then | |
106 | %userremove %{name} | |
107 | %groupremove %{name} | |
108 | fi | |
109 | ||
73807a5d | 110 | %files |
111 | %defattr(644,root,root,755) | |
6477195c | 112 | %doc README.md |
6b1b2506 | 113 | %attr(755,root,root) %{_sbindir}/pound |
9df600c4 | 114 | %dir %{_sysconfdir} |
6477195c | 115 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.yaml |
ef2dd428 | 116 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
9a81a858 | 117 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
83dd8e4d | 118 | %{_mandir}/man8/* |
0453b2b1 | 119 | %{systemdtmpfilesdir}/%{name}.conf |
5474a5a6 | 120 | %dir /var/run/%{name} |