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