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