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