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