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