]> git.pld-linux.org Git - packages/pound.git/blame - pound.spec
- disable tcmalloc usage on x32
[packages/pound.git] / pound.spec
CommitLineData
95d418a4
JR
1%bcond_without tcmalloc # tcmalloc allocator
2
3%ifarch x32
4%undefine with_tcmalloc
5%endif
73807a5d 6Summary: Pound - reverse-proxy and load-balancer
7fbec31c 7Summary(pl.UTF-8): Pound - reverse-proxy i load-balancer
73807a5d 8Name: pound
6444554c 9Version: 2.7
95d418a4 10Release: 2
361f3ee8 11License: GPL v3
73807a5d 12Group: Networking/Daemons
73807a5d 13Source0: http://www.apsis.ch/pound/Pound-%{version}.tgz
6444554c 14# Source0-md5: ec8298aa3e4aee3ffbecdc0639d7f14a
8a12d360
JR
15Source1: %{name}.cfg
16Source2: %{name}.init
17Source3: %{name}.sysconfig
18Source4: %{name}.logrotate
19Source5: %{name}.tmpfiles
487cceae
ER
20Patch0: %{name}-hash-UL.patch
21Patch1: %{name}-logfile.patch
22Patch2: %{name}-daemonize.patch
23Patch3: %{name}-log-notice.patch
24Patch4: %{name}-man.patch
73807a5d 25URL: http://www.apsis.ch/pound/
f8a55c4f 26BuildRequires: automake
95d418a4 27%{?with_tcmalloc:BuildRequires: libtcmalloc-devel}
18e83af5 28BuildRequires: openssl-devel >= 0.9.7d
335ccc63 29BuildRequires: openssl-tools
f8a55c4f 30BuildRequires: pcre-devel
0453b2b1 31BuildRequires: rpmbuild(macros) >= 1.644
6e57d9ed 32Requires(post,preun): /sbin/chkconfig
5474a5a6
ER
33Requires(postun): /usr/sbin/groupdel
34Requires(postun): /usr/sbin/userdel
35Requires(pre): /bin/id
36Requires(pre): /usr/bin/getgid
37Requires(pre): /usr/sbin/groupadd
38Requires(pre): /usr/sbin/useradd
767184e8 39Requires: pcre >= 7.8
2dbe9c52 40Requires: rc-scripts
5474a5a6
ER
41Provides: group(pound)
42Provides: user(pound)
6b1b2506 43Conflicts: logrotate < 3.7-4
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
68%patch2 -p1
6b1b2506
ER
69%patch3 -p1
70%patch4 -p1
73807a5d 71
72%build
f8a55c4f 73cp -f /usr/share/automake/config.sub .
9ea1ad0e 74%configure \
7c4d13be
ER
75 --enable-super \
76 --enable-pcreposix \
95d418a4 77 %{__enable_disable tcmalloc} \
7c4d13be 78 --disable-hoard \
e6ba7a2a 79 --with-maxbuf=6144
9df600c4 80%{__make}
73807a5d 81
82%install
83rm -rf $RPM_BUILD_ROOT
6b1b2506 84install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
8a12d360 85 $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
0453b2b1 86 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
73807a5d 87
e6ba7a2a 88install -p pound $RPM_BUILD_ROOT%{_sbindir}
b329097e
ER
89install -p poundctl $RPM_BUILD_ROOT%{_sbindir}
90cp -p pound.8 $RPM_BUILD_ROOT%{_mandir}/man8
91cp -p poundctl.8 $RPM_BUILD_ROOT%{_mandir}/man8
92cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
93install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
94cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
95cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
e6ba7a2a 96cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
8a12d360 97
6e57d9ed
JB
98%clean
99rm -rf $RPM_BUILD_ROOT
100
5474a5a6
ER
101%pre
102%groupadd -g 200 %{name}
103%useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
104
73807a5d 105%post
6b1b2506
ER
106for a in access.log pound.log; do
107 if [ ! -f /var/log/%{name}/$a ]; then
108 touch /var/log/%{name}/$a
109 chown pound:pound /var/log/%{name}/$a
110 chmod 644 /var/log/%{name}/$a
111 fi
112done
73807a5d 113/sbin/chkconfig --add %{name}
5474a5a6 114%service %{name} restart "Pound Daemon"
73807a5d 115
116%preun
cfc0cb59
ER
117if [ "$1" = "0" ]; then
118 %service %{name} stop
119 /sbin/chkconfig --del %{name}
73807a5d 120fi
73807a5d 121
5474a5a6
ER
122%postun
123if [ "$1" = "0" ]; then
124 %userremove %{name}
125 %groupremove %{name}
126fi
127
73807a5d 128%files
129%defattr(644,root,root,755)
35c6c398 130%doc README FAQ CHANGELOG z*.py
6b1b2506
ER
131%attr(755,root,root) %{_sbindir}/pound
132%attr(755,root,root) %{_sbindir}/poundctl
9df600c4
ER
133%dir %{_sysconfdir}
134%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.cfg
ef2dd428 135%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
6b1b2506 136%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
9a81a858 137%attr(754,root,root) /etc/rc.d/init.d/%{name}
83dd8e4d 138%{_mandir}/man8/*
0453b2b1 139%{systemdtmpfilesdir}/%{name}.conf
5474a5a6 140%dir /var/run/%{name}
9df600c4
ER
141%dir %attr(751,root,root) /var/log/%{name}
142%attr(750,root,root) %dir /var/log/archive/%{name}
This page took 0.050216 seconds and 4 git commands to generate.