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