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