]> git.pld-linux.org Git - packages/pound.git/blob - pound.spec
ensure consistent build by enforcing options, BR tcmalloc
[packages/pound.git] / pound.spec
1 Summary:        Pound - reverse-proxy and load-balancer
2 Summary(pl.UTF-8):      Pound - reverse-proxy i load-balancer
3 Name:           pound
4 Version:        2.6
5 Release:        7
6 License:        GPL v3
7 Group:          Networking/Daemons
8 Source0:        http://www.apsis.ch/pound/Pound-%{version}.tgz
9 # Source0-md5:  8c913b527332694943c4c67c8f152071
10 Source1:        %{name}.cfg
11 Source2:        %{name}.init
12 Source3:        %{name}.sysconfig
13 Source4:        %{name}.logrotate
14 Source5:        %{name}.tmpfiles
15 Patch0:         %{name}-hash-UL.patch
16 Patch1:         %{name}-logfile.patch
17 Patch2:         %{name}-daemonize.patch
18 Patch3:         %{name}-log-notice.patch
19 Patch4:         %{name}-man.patch
20 URL:            http://www.apsis.ch/pound/
21 BuildRequires:  automake
22 BuildRequires:  libtcmalloc-devel
23 BuildRequires:  openssl-devel >= 0.9.7d
24 BuildRequires:  openssl-tools
25 BuildRequires:  pcre-devel
26 BuildRequires:  rpmbuild(macros) >= 1.644
27 Requires(post,preun):   /sbin/chkconfig
28 Requires(postun):       /usr/sbin/groupdel
29 Requires(postun):       /usr/sbin/userdel
30 Requires(pre):  /bin/id
31 Requires(pre):  /usr/bin/getgid
32 Requires(pre):  /usr/sbin/groupadd
33 Requires(pre):  /usr/sbin/useradd
34 Requires:       pcre >= 7.8
35 Requires:       rc-scripts
36 Provides:       group(pound)
37 Provides:       user(pound)
38 Conflicts:      logrotate < 3.7-4
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         _sysconfdir     /etc/pound
42
43 %description
44 The Pound program is a reverse proxy, load balancer and HTTPS
45 front-end for Web server(s). Pound was developped to enable
46 distributing the load among several Web-servers and to allow for a
47 convenient SSL wrapper for those Web servers that do not offer it
48 natively. Pound is distributed under the GPL - no warranty, it's free
49 to use, copy and give away.
50
51 %description -l pl.UTF-8
52 Program Pound jest odwrotnym proxy, load-balancerem i interfejsem
53 HTTPS do serwera(ów) WWW. Pount został stworzony by pozwolić na
54 rozdzielenie obciążenia na kilka serwerów WWW i pozwolić na wygodne
55 opakowanie SSL-em tych serwerów, które same nie obsługują SSL. Pound
56 jest rozpowszechniany na licencji GPL - bez gwarancji, z możliwością
57 swobodnego używania, kopiowania i rozdawania.
58
59 %prep
60 %setup -q -n Pound-%{version}
61 %patch0 -p1
62 %patch1 -p1
63 %patch2 -p1
64 %patch3 -p1
65 %patch4 -p1
66
67 %build
68 cp -f /usr/share/automake/config.sub .
69 %configure \
70         --enable-super \
71         --enable-pcreposix \
72         --enable-tcmalloc \
73         --disable-hoard \
74         --with-maxbuf=6144
75 %{__make}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir},/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
80         $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
81         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
82
83 install -p pound $RPM_BUILD_ROOT%{_sbindir}
84 install -p poundctl $RPM_BUILD_ROOT%{_sbindir}
85 cp -p pound.8  $RPM_BUILD_ROOT%{_mandir}/man8
86 cp -p poundctl.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 %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
91 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %pre
97 %groupadd -g 200 %{name}
98 %useradd -u 200 -d /var/lib/%{name} -g %{name} -c "Pound Daemon" %{name}
99
100 %post
101 for a in access.log pound.log; do
102         if [ ! -f /var/log/%{name}/$a ]; then
103                 touch /var/log/%{name}/$a
104                 chown pound:pound /var/log/%{name}/$a
105                 chmod 644 /var/log/%{name}/$a
106         fi
107 done
108 /sbin/chkconfig --add %{name}
109 %service %{name} restart "Pound Daemon"
110
111 %preun
112 if [ "$1" = "0" ]; then
113         %service %{name} stop
114         /sbin/chkconfig --del %{name}
115 fi
116
117 %postun
118 if [ "$1" = "0" ]; then
119         %userremove %{name}
120         %groupremove %{name}
121 fi
122
123 %files
124 %defattr(644,root,root,755)
125 %doc README FAQ CHANGELOG z*.py
126 %attr(755,root,root) %{_sbindir}/pound
127 %attr(755,root,root) %{_sbindir}/poundctl
128 %dir %{_sysconfdir}
129 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pound.cfg
130 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
132 %attr(754,root,root) /etc/rc.d/init.d/%{name}
133 %{_mandir}/man8/*
134 %{systemdtmpfilesdir}/%{name}.conf
135 %dir /var/run/%{name}
136 %dir %attr(751,root,root) /var/log/%{name}
137 %attr(750,root,root) %dir /var/log/archive/%{name}
This page took 1.450127 seconds and 4 git commands to generate.