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