]> git.pld-linux.org Git - packages/pound.git/blame - pound.spec
- updated dependencies, release 2 (nanomsg soname change)
[packages/pound.git] / pound.spec
CommitLineData
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 8Summary: Pound - reverse-proxy and load-balancer
7fbec31c 9Summary(pl.UTF-8): Pound - reverse-proxy i load-balancer
73807a5d 10Name: pound
875c35e0 11Version: 3.0.2
f8f3fdb5 12Release: 2
361f3ee8 13License: GPL v3
73807a5d 14Group: Networking/Daemons
73807a5d 15Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
875c35e0 16# Source0-md5: c0f5af4cd6aa184c00f4848ae1c4536a
6477195c 17Source1: %{name}.yaml
8a12d360
JR
18Source2: %{name}.init
19Source3: %{name}.sysconfig
8a12d360 20Source5: %{name}.tmpfiles
6477195c
JR
21Patch0: tcmalloc.patch
22Patch1: pound-man.patch
875c35e0
JR
23Patch2: mbedtls3.patch
24URL: https://www.apsis.ch/pound.html
f8f3fdb5 25BuildRequires: cmake >= 3.0
95d418a4 26%{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
f8f3fdb5
JB
27BuildRequires: mbedtls-devel
28BuildRequires: nanomsg-devel
29BuildRequires: pcre2-8-devel
30BuildRequires: pcre2-posix-devel
0453b2b1 31BuildRequires: rpmbuild(macros) >= 1.644
f8f3fdb5 32BuildRequires: yaml-devel
6e57d9ed 33Requires(post,preun): /sbin/chkconfig
5474a5a6
ER
34Requires(postun): /usr/sbin/groupdel
35Requires(postun): /usr/sbin/userdel
36Requires(pre): /bin/id
37Requires(pre): /usr/bin/getgid
38Requires(pre): /usr/sbin/groupadd
39Requires(pre): /usr/sbin/useradd
767184e8 40Requires: pcre >= 7.8
2dbe9c52 41Requires: rc-scripts
5474a5a6
ER
42Provides: group(pound)
43Provides: user(pound)
73807a5d 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
9df600c4
ER
46%define _sysconfdir /etc/pound
47
73807a5d 48%description
49The Pound program is a reverse proxy, load balancer and HTTPS
50front-end for Web server(s). Pound was developped to enable
51distributing the load among several Web-servers and to allow for a
52convenient SSL wrapper for those Web servers that do not offer it
53natively. Pound is distributed under the GPL - no warranty, it's free
54to use, copy and give away.
55
ebd232a4 56%description -l pl.UTF-8
f8243939 57Program Pound jest odwrotnym proxy, load-balancerem i interfejsem
ebd232a4
JR
58HTTPS do serwera(ów) WWW. Pount został stworzony by pozwolić na
59rozdzielenie obciążenia na kilka serwerów WWW i pozwolić na wygodne
60opakowanie SSL-em tych serwerów, które same nie obsługują SSL. Pound
61jest rozpowszechniany na licencji GPL - bez gwarancji, z możliwością
62swobodnego 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
71install -d build
72cd build
f8f3fdb5 73%cmake .. \
6477195c 74 %{?with_tcmalloc:-DWANT_TCMALLOC:BOOL=ON}
9df600c4 75%{__make}
73807a5d 76
77%install
78rm -rf $RPM_BUILD_ROOT
6477195c
JR
79install -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
83install -p build/pound $RPM_BUILD_ROOT%{_sbindir}
84cp -p man/pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
b329097e
ER
85cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
86install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
87cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
e6ba7a2a 88cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
8a12d360 89
6e57d9ed
JB
90%clean
91rm -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
102if [ "$1" = "0" ]; then
103 %service %{name} stop
104 /sbin/chkconfig --del %{name}
73807a5d 105fi
73807a5d 106
5474a5a6
ER
107%postun
108if [ "$1" = "0" ]; then
109 %userremove %{name}
110 %groupremove %{name}
111fi
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}
This page took 0.401574 seconds and 4 git commands to generate.