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