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