]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
- two fixes from Squids site: 100% CPU usage on new/experimental kernels
[packages/squid.git] / squid.spec
1 #
2 # Conditional build:
3 %bcond_with     combined_log    # enables apache-like combined log format
4 #
5 Summary:        SQUID Internet Object Cache
6 Summary(es):    proxy/cache para WWW/FTP/gopher
7 Summary(pl):    Uniwersalny proxy-cache server
8 Summary(pt_BR): Cache Squid de objetos Internet
9 Summary(ru):    Squid - ËÜÛ ÏÂßÅËÔÏ× Internet
10 Summary(uk):    Squid - ËÅÛ ÏÂ'¤ËԦנInternet
11 Summary(zh_CN): SQUID ¸ßËÙ»º³å´úÀí·þÎñÆ÷
12 Name:           squid
13 Version:        2.5.STABLE7
14 Release:        6
15 Epoch:          7
16 License:        GPL v2
17 Group:          Networking/Daemons
18 Source0:        http://www.squid-cache.org/Versions/v2/2.5/%{name}-%{version}.tar.bz2
19 # Source0-md5:  bf63e34906c68d716896eec0351108dc
20 # Source0-size: 1051830
21 # http://www.squid-cache.org/Doc/FAQ/FAQ.tar.gz
22 Source1:        %{name}-FAQ.tar.gz
23 # Source1-md5:  cb9a955f8cda9cc166e086fccd412a43
24 # Source1-size: 189993
25 Source2:        %{name}.init
26 Source3:        %{name}.sysconfig
27 # http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
28 Source4:        %{name}-book-full-html.zip
29 # Source4-md5:  4f3b6dab1de9cbb847df89d8b417378a
30 # Source4-size: 120253
31 Source5:        %{name}.conf.patch
32 Source6:        %{name}.logrotate
33 Source7:        %{name}.pamd
34 # Bug fixes from Squid home page:
35 Patch0:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-half_closed_POST.patch
36 Patch1:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7_req_resp_header.patch
37 Patch2:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-non_blocking_disk.patch
38 Patch3:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-blank_response.patch
39 # Other patches:
40 Patch100:       http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
41 Patch101:       %{name}-fhs.patch
42 Patch102:       %{name}-location.patch
43 Patch103:       %{name}-domainmatch.patch
44 Patch104:       %{name}-libnsl_fixes.patch
45 Patch105:       %{name}-ac_fix.patch
46 Patch106:       %{name}-crash-on-ENOSPC.patch
47 Patch107:       %{name}-newssl.patch
48 Patch108:       %{name}-nolibs.patch
49 Patch109:       http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
50 Patch110:       %{name}-empty-referer.patch
51 Patch111:       %{name}-2.5.STABLE4-apache-like-combined-log.patch
52 URL:            http://www.squid-cache.org/
53 BuildRequires:  autoconf
54 BuildRequires:  automake
55 BuildRequires:  cyrus-sasl-devel >= 2.1.0
56 BuildRequires:  findutils
57 BuildRequires:  openldap-devel
58 BuildRequires:  openssl-devel >= 0.9.7d
59 BuildRequires:  pam-devel
60 BuildRequires:  perl-base
61 BuildRequires:  rpmbuild(macros) >= 1.166
62 PreReq:         rc-scripts >= 0.2.0
63 PreReq:         setup >= 2.4.6
64 Requires(pre):  /bin/id
65 Requires(pre):  /usr/bin/getgid
66 Requires(pre):  /usr/lib/rpm/user_group.sh
67 Requires(pre):  /usr/sbin/groupadd
68 Requires(pre):  /usr/sbin/useradd
69 Requires(post,preun):   /sbin/chkconfig
70 Requires(post): fileutils
71 Requires(post): findutils
72 Requires(post): grep
73 Requires(post): /bin/hostname
74 Requires(postun):       /usr/sbin/groupdel
75 Requires(postun):       /usr/sbin/userdel
76 Provides:       group(squid)
77 Provides:       user(squid)
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 %define         _libexecdir     %{_libdir}/%{name}
81 %define         _sysconfdir     /etc/%{name}
82 %define         _cgidir         /home/services/httpd/cgi-bin
83
84 %description
85 Squid is a high-performance proxy caching server for web clients,
86 supporting FTP, gopher, and HTTP data objects. Unlike traditional
87 caching software, Squid handles all requests in a single,
88 non-blocking, I/O-driven process. Squid keeps meta data and especially
89 hot objects cached in RAM, caches DNS lookups, supports non-blocking
90 DNS lookups, and implements negative caching of failed requests. If
91 you are tight on memory, check out the NOVM version of this package.
92 Squid supports SSL, extensive access controls, and full request
93 logging. By using the lightweight Internet Cache Protocol, Squid
94 caches can be arranged in a hierarchy or mesh for additional bandwidth
95 savings. Squid consists of a main server program squid, a Domain Name
96 System lookup program dnsserver, a program for retrieving FTP data
97 ftpget, and some management and client tools. When squid starts up, it
98 spawns a configurable number of dnsserver processes, each of which can
99 perform a single, blocking Domain Name System (DNS) lookup. This
100 reduces the amount of time the cache waits for DNS lookups. Squid is
101 derived from the ARPA-funded Harvest project.
102
103 %description -l es
104 Squid es un servidor proxy con caché de alto desempeño para clientes
105 web, soportando FTP, gopher y HTTP. Diferentemente de softwares
106 tradicionales de caché squid manipula todas las requisiciones en un
107 único proceso sin bloqueos, direccionado a E/S. Mantienen metadatos y
108 objetos frecuentemente pedidos en uno caché en memoria RAM. Hace caché
109 de resoluciones DNS, soporta resoluciones DNS sin bloqueo y implementa
110 un caché negativo de requisiciones que fallen. Si tiene poca memoria
111 da un vistazo en la versión NOVM de este paquete. También soporta SSL,
112 controles extensivos de acceso y registro (log) completo de las
113 requisiciones. Usando el ligero Protocolo de Caches Internet (ICP)
114 puede ser usado en una jerarquía de servidores para mayor ahorro de la
115 banda de comunicación. Está compuesto del programa squid (servidor
116 principal), del programa dnsserver (para resolución DNS), del programa
117 ftpget (para transmisiones ftp) y otras herramientas clientes y para
118 administración. Cuando squid se inicia, dispara un número configurable
119 de procesos dnsserver, cada uno pudiendo ejecutar solamente una
120 resolución DNS con poder de bloquear. Esto reduce el tiempo que el
121 caché espera por resoluciones DNS. Fue derivado del proyecto Harvest,
122 financiado por la ARPA.
123
124 %description -l pl
125 Squid jest wysoce wydajnym serwerem proxy-cache dla przegl±darek WWW,
126 klientów FTP i gopher. Squid przechowuje najczê¶ciej pobierane dane w
127 pamiêci RAM i zapamiêtuje odwo³ania do DNS. Squid oferuje wsparcie dla
128 SSL, rozbudowan± kontrolê dostêpu oraz pe³ne rejestrowanie pobieranych
129 danych. Dziêki u¿yciu protoko³u ICP (Internet Cache Protocol), serwer
130 squid mo¿na ³±czyæ w hierarchiê, zwiêkszaj±c ich efektywno¶æ. Pakiet
131 squid obejmuje: g³ówny program serwera squid, program dostarczaj±cy
132 informacji z DNS dnsserver, program odbieraj±cy dane FTP ftpget, oraz
133 pomocnicze programy do zarz±dzania. Squid wywodzi siê ze
134 sponsorowanego przez ARPA projektu Harvest.
135
136 %description -l pt_BR
137 O Squid é um servidor proxy com cache de alta performance para
138 clientes web, suportando FTP, gopher e HTTP. Diferentemente de
139 softwares tradicionais de cache o squid manipula todas as requisições
140 em um único processo sem bloqueios, direcionado a E/S.
141
142 Mantém meta dados e objetos freqüentemente pedidos num cache em
143 memória RAM. Faz cache de resoluções DNS, suporta resoluções DNS sem
144 bloqueio e implementa um cache negativo de requisições que falharem.
145 Se você tem pouca memória dê uma olhada na versão NOVM deste pacote.
146
147 Também suporta SSL, controles extensivos de acesso e registro (log)
148 completo das requisições. Usando o leve Protocolo de Caches Internet
149 (ICP) ele pode ser usado em uma hierarquia de servidores para maior
150 economia de banda de comunicação.
151
152 Ele consiste do programa squid (servidor principal), do programa
153 dnsserver (para resolução DNS), do programa ftpget (para transmissões
154 ftp) e outras ferramentas clientes e para gerenciamento. Quando o
155 squid é inicializado ele dispara um número configurável de processos
156 dnsserver, cada um podendo executar somente uma resolução DNS
157 bloqueante. Isto reduz o tempo que o cache espera por resoluções DNS.
158
159 Foi derivado do projeto Harvest, financiado pela ARPA.
160
161 %description -l ru
162 Squid - ÜÔÏ ×ÙÓÏËÏÐÒÏÉÚ×ÏÄÉÔÅÌØÎÙÊ ËÜÛÉÒÕÀÝÉÊ ÐÒÏËÓÉ-ÓÅÒ×ÅÒ ÄÌÑ
163 ËÌÉÅÎÔÏ× web, ÐÏÄÄÅÒÖÉ×ÁÀÝÉÊ ÏÂßÅËÔÙ ÄÁÎÎÙÈ ÔÉÐÁ FTP, gopher É HTTP. ÷
164 ÏÔÌÉÞÉÅ ÏÔ ÔÒÁÄÉÃÉÏÎÎÙÈ ËÜÛÉÒÕÀÝÉÈ ÐÒÏÇÒÁÍÍ, Squid ÏÂÒÁÂÁÔÙ×ÁÅÔ ×ÓÅ
165 ÚÁÐÒÏÓÙ ÐÒÉ ÐÏÍÏÝÉ ÏÄÎÏÇÏ ÎÅÂÌÏËÉÒÕÀÝÅÇÏÓÑ, ÕÐÒÁ×ÌÑÅÍÏÇÏ
166 ××ÏÄÏÍ-×Ù×ÏÄÏÍ ÐÒÏÃÅÓÓÁ.
167
168 üÔÏÔ ÐÁËÅÔ ÉÍÅÅÔ ×ÓÔÒÏÅÎÎÕÀ ÐÏÄÄÅÒÖËÕ ÂÁÚÙ ÄÁÎÎÙÈ ÓÅÔÅ×ÙÈ ICMP-ÐÒÏÂ
169 (Netdb).
170
171 %description -l uk
172 Squid - ÃÅ ËÅÛÕÀÞÉÊ ÐÒÏËÓ¦-ÓÅÒ×ÅÒ ÄÌÑ web-Ë̦¤ÎÔ¦×, ÝϠЦÄÔÒÉÍÕ¤
173 ÏÂ'¤ËÔÉ ÄÁÎÉÈ ÔÉÐÕ FTP, gopher ÔÁ HTTP. îÁ ×¦ÄͦÎՠצĠÔÒÁÄÉæÊÎÉÈ
174 ËÅÛÕÀÞÉÈ ÐÒÏÇÒÁÍ, Squid ÏÂÒÏÂÌѤ ×Ó¦ ÚÁÐÉÔÉ ÚÁ ÄÏÐÏÍÏÇÏÀ ÏÄÎÏÇÏ
175 ÎÅÂÌÏËÕÀÞÏÇÏ, ËÅÒÏ×ÁÎÏÇÏ ××ÏÄÏÍ-×É×ÏÄÏÍ ÐÒÏÃÅÓÕ.
176
177 ãÅÊ ÐÁËÅÔ ÍÁ¤ ×ÂÕÄÏ×ÁÎՠЦÄÔÒÉÍËÕ ÂÁÚÉ ÄÁÎÉÈ ÍÅÒÅÖÅ×ÉÈ ICMP-ÐÒÏÂ
178 (Netdb).
179
180 %package cachemgr
181 Summary:        CGI script for Squid management
182 Summary(pl):    Skrypt CGI do zarz±dzania Squidem przez WWW
183 Group:          Networking/Admin
184 Requires:       %{name} = %{epoch}:%{version}-%{release}
185 Requires:       httpd
186
187 %description cachemgr
188 Cachemgr.cgi is a CGI script that allows administrator to chceck
189 various informations about Squid via WWW.
190
191 %description cachemgr -l pl
192 Cachemgr.cgi jest skryptem CGI, który pozwala administratorowi
193 zapoznaæ siê z informacjami o pracy Squida poprzez WWW.
194
195 %package ldap_auth
196 Summary:        LDAP authentication helper for Squid
197 Summary(pl):    Obs³uga uwierzytelniania LDAP dla squida
198 Group:          Networking/Admin
199 Requires:       %{name} = %{epoch}:%{version}-%{release}
200
201 %description ldap_auth
202 This Squid helper allows authentication against LDAP directories using
203 the "simple authentication" (plain-text).
204
205 %description ldap_auth -l pl
206 Pakiet ten pozwala na uwierzytelnianie przez LDAP za pomoc± prostego
207 uwierzytelniania (otwartym tekstem).
208
209 %package pam_auth
210 Summary:        PAM authentication helper for Squid
211 Summary(pl):    Obs³uga uwierzytelniania PAM dla squida
212 Group:          Networking/Admin
213 Requires:       %{name} = %{epoch}:%{version}-%{release}
214 Requires:       pam >= 0.77.3
215
216 %description pam_auth
217 This program authenticates users against a PAM configured
218 authentication service "squid". This allows you to authenticate Squid
219 users to any authentication source for which you have a PAM module.
220
221 %description pam_auth -l pl
222 Program ten pozwala na uwierzytelnianie u¿ytkowników squida w dowolnym
223 ¼ródle posiadaj±cym modu³ PAM.
224
225 %package smb_auth
226 Summary:        SMB authentication helper for Squid
227 Summary(pl):    Obs³uga uwierzytelniania SMB dla squida
228 Group:          Networking/Admin
229 Requires:       %{name} = %{epoch}:%{version}-%{release}
230
231 %description smb_auth
232 This is a proxy authentication module. With smb_auth you can
233 authenticate proxy users against an SMB server like Windows NT or
234 Samba.
235
236 %description smb_auth -l pl
237 To jest modu³ uwierzytelniania proxy. Przy pomocy smb_auth mo¿na
238 uwierzytelniaæ u¿ytkowników proxy na serwerach SMB, jak Windows NT czy
239 Samba.
240
241 %package msnt_auth
242 Summary:        MSNT domain authentication helper for Squid
243 Summary(pl):    Obs³uga uwierzytelniania w domenie MSNT dla squida
244 Group:          Networking/Admin
245 Requires:       %{name} = %{epoch}:%{version}-%{release}
246
247 %description msnt_auth
248 This is an authentication module for the Squid proxy server to
249 authenticate users on an NT domain.
250
251 %description msnt_auth -l pl
252 Jest to modu³ uwierzytelniania proxy, który pozwala na
253 uwierzytelnianie u¿ytkowników proxy w domenie NT.
254
255 %package yp_auth
256 Summary:        YP authentication helper for Squid
257 Summary(pl):    Obs³uga uwierzytelniania YP dla squida
258 Group:          Networking/Admin
259 Requires:       %{name} = %{epoch}:%{version}-%{release}
260
261 %description yp_auth
262 This is an authentication module for the Squid proxy server to
263 authenticate users on YP.
264
265 %description yp_auth -l pl
266 Jest to modu³ uwierzytelniania proxy, który pozwala na
267 uwierzytelnianie u¿ytkowników proxy poprzez YP.
268
269 %package ncsa_auth
270 Summary:        NCSA httpd style authentication helper for Squid
271 Summary(pl):    Obs³uga uwierzytelniania NCSA httpd dla squida
272 Group:          Networking/Admin
273 Requires:       %{name} = %{epoch}:%{version}-%{release}
274
275 %description ncsa_auth
276 This module uses a NCSA httpd style password file for authentication.
277
278 %description ncsa_auth -l pl
279 Modu³ uwierzytelniania proxy u¿ywaj±cy pliku hase³ jak w NCSA httpd.
280
281 %package sasl_auth
282 Summary:        SASL authentication helper for Squid
283 Summary(pl):    Obs³uga uwierzytelniania SASL dla squida
284 Group:          Networking/Admin
285 Requires:       %{name} = %{epoch}:%{version}-%{release}
286
287 %description sasl_auth
288 This is an authentication module for the Squid proxy server to
289 authenticate users via SASL.
290
291 %description sasl_auth -l pl
292 Jest to modu³ uwierzytelniania proxy, który pozwala na
293 uwierzytelnianie u¿ytkowników proxy poprzez SASL.
294
295 %package winbind_auth
296 Summary:        WINBIND authentication helper for Squid
297 Summary(pl):    Obs³uga uwierzytelniania WINBIND dla squida
298 Group:          Networking/Admin
299 Requires:       %{name} = %{epoch}:%{version}-%{release}
300
301 %description winbind_auth
302 This is an authentication module for the Squid proxy server to
303 authenticate users via WINBIND.
304
305 %description winbind_auth -l pl
306 Jest to modu³ uwierzytelniania proxy, który pozwala na
307 uwierzytelnianie u¿ytkowników proxy poprzez WINBIND.
308
309 %package getpwname_auth
310 Summary:        getpwname authentication helper for Squid
311 Summary(pl):    Obs³uga uwierzytelniania getpwname dla squida
312 Group:          Networking/Admin
313 Requires:       %{name} = %{epoch}:%{version}-%{release}
314
315 %description getpwname_auth
316 This is an authentication module for the Squid proxy server to
317 authenticate users using getpwname.
318
319 %description getpwname_auth -l pl
320 Jest to modu³ uwierzytelniania proxy, który pozwala na
321 uwierzytelnianie u¿ytkowników proxy poprzez getpwname.
322
323 %package passwd_auth
324 Summary:        passwd authentication helper for Squid
325 Summary(pl):    Obs³uga uwierzytelniania passwd dla squida
326 Group:          Networking/Admin
327 Requires:       %{name} = %{epoch}:%{version}-%{release}
328
329 %description passwd_auth
330 This is an authentication module for the Squid proxy server to
331 authenticate users with separate passwd file.
332
333 %description passwd_auth -l pl
334 Jest to modu³ uwierzytelniania proxy, który pozwala na
335 uwierzytelnianie u¿ytkowników proxy poprzez oddzielny plik passwd.
336
337 %package ntlm_auth
338 Summary:        NTLM authentication helper for Squid
339 Summary(pl):    Obs³uga uwierzytelniania NTLM dla squida
340 Group:          Networking/Admin
341 Requires:       %{name} = %{epoch}:%{version}-%{release}
342
343 %description ntlm_auth
344 This is an authentication module for the Squid proxy server to
345 authenticate users on NTLM.
346
347 %description ntlm_auth -l pl
348 Jest to modu³ uwierzytelniania proxy, który pozwala na
349 uwierzytelnianie u¿ytkowników proxy poprzez NTLM.
350
351 %package ip_acl
352 Summary:        IP external ACL helper for Squid
353 Summary(pl):    Wsparcie kontroli dostêpu przez IP dla squida
354 Group:          Networking/Admin
355 Requires:       %{name} = %{epoch}:%{version}-%{release}
356
357 %description ip_acl
358 This is an external ACL module for the Squid proxy server to limit
359 access for users based on IP address.
360
361 %description ip_acl -l pl
362 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
363 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich adresu IP.
364
365 %package ldap_acl
366 Summary:        LDAP group external ACL helper for Squid
367 Summary(pl):    Wsparcie kontroli dostêpu przez grupy LDAP dla squida
368 Group:          Networking/Admin
369 Requires:       %{name} = %{epoch}:%{version}-%{release}
370
371 %description ldap_acl
372 This is an external ACL module for the Squid proxy server to limit
373 access for users based on LDAP group membership.
374
375 %description ldap_acl -l pl
376 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
377 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
378 przynale¿no¶ci do grup LDAP.
379
380 %package unix_acl
381 Summary:        UNIX group external ACL helper for Squid
382 Summary(pl):    Wsparcie kontroli dostêpu przez grupy UNIX dla squida
383 Group:          Networking/Admin
384 Requires:       %{name} = %{epoch}:%{version}-%{release}
385
386 %description unix_acl
387 This is an external ACL module for the Squid proxy server to limit
388 access for users based on UNIX group membership.
389
390 %description unix_acl -l pl
391 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
392 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
393 przynale¿no¶ci do grup UNIX.
394
395 %package wbinfo_acl
396 Summary:        NT domain group external ACL helper for Squid
397 Summary(pl):    Wsparcie kontroli dostêpu przez grupy w domenie NT dla squida
398 Group:          Networking/Admin
399 Requires:       %{name} = %{epoch}:%{version}-%{release}
400
401 %description wbinfo_acl
402 This is an external ACL module for the Squid proxy server to limit
403 access for users based on NT domain group membership using wbinfo.
404
405 %description wbinfo_acl -l pl
406 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
407 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
408 przynale¿no¶ci do grup w domenie NT przy u¿yciu wbinfo.
409
410 %package winbind_acl
411 Summary:        NT domain group external ACL helper for Squid
412 Summary(pl):    Wsparcie kontroli dostêpu przez grupy w domenie NT dla squida
413 Group:          Networking/Admin
414 Requires:       %{name} = %{epoch}:%{version}-%{release}
415
416 %description winbind_acl
417 This is an external ACL module for the Squid proxy server to limit
418 access for users based on NT domain group membership based on Samba
419 Winbindd from Samba 2.2.4 or greater.
420
421 %description winbind_acl -l pl
422 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
423 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
424 przynale¿no¶ci do grup w domenie NT oparty na Samba Winbindd z pakietu
425 Samba 2.2.4 lub wy¿szego.
426
427 %prep
428 %setup -q -a1 -a4
429 # Bug fixes from Squid home page:
430 %patch0 -p1
431 %patch1 -p1
432 %patch2 -p1
433 %patch3 -p1
434 # Other patches:
435 %patch100 -p1
436 %patch101 -p1
437 %patch102 -p1
438 %patch103 -p1
439 %patch104 -p1
440 %patch105 -p1
441 %patch106 -p1
442 %patch107 -p1
443 %patch108 -p1
444 %patch109 -p1
445 %patch110 -p1
446 %{?with_combined_log:%patch111 -p1}
447
448 %build
449 %{__aclocal}
450 %{__autoconf}
451 %{__automake}
452 %configure \
453         --datadir=%{_datadir}/squid \
454         --disable-ipf-transparent \
455         --enable-arp-acl \
456         --enable-auth=yes \
457         --enable-basic-auth-helpers=yes \
458         --enable-cache-digests \
459         --enable-carp \
460         --enable-delay-pools \
461         --enable-digest-auth-helpers=yes \
462         --enable-err-language=English \
463         --enable-external-acl-helpers=yes \
464         --enable-forw-via-db \
465         --enable-htcp \
466         --enable-icmp \
467         --enable-linux-netfilter \
468         --enable-ntlm-auth-helpers=yes \
469         --enable-referer-log \
470         --enable-removal-policies="lru heap" \
471         --enable-ssl \
472         --enable-snmp \
473         --enable-storeio="aufs,coss,diskd,null,ufs" \
474         --enable-underscores \
475         --enable-useragent-log \
476         --enable-x-accelerator-vary \
477         --localstatedir=/var \
478         --sysconfdir=%{_sysconfdir} \
479         --with-pthreads
480
481 %{__make}
482
483 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' contrib/*
484 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' scripts/*
485 find helpers/ -type f | xargs perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g'
486
487 %install
488 rm -rf $RPM_BUILD_ROOT
489 install -d $RPM_BUILD_ROOT%{_cgidir} \
490         $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
491         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
492         $RPM_BUILD_ROOT%{_mandir}/man8 \
493         $RPM_BUILD_ROOT%{_datadir}/squid \
494         $RPM_BUILD_ROOT/var/{cache,log{,/archiv}}/squid
495
496 %{__make} install \
497         DESTDIR=$RPM_BUILD_ROOT
498
499 cp -a contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
500 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
501
502 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
503 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
504
505 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
506
507 cd $RPM_BUILD_ROOT/etc/squid
508 cp -f squid.conf{,.default}
509 patch -p0 < %{SOURCE5}
510 cd -
511
512 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
513 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
514 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
515
516 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
517
518 # These two files start squid. They are replaced by /etc/rc.d/init.d script.
519 rm -f $RPM_BUILD_ROOT%{_bindir}/R*
520
521 # dunno why, but manual is not installed
522 mv doc/squid.8 $RPM_BUILD_ROOT%{_mandir}/man8
523
524 # We don't want Makefiles as docs...
525 rm -f doc/Makefile*
526
527 # We don't like message: rpm found unpackaged files ...
528 rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
529         $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
530
531 %clean
532 rm -rf $RPM_BUILD_ROOT
533
534 %triggerpostun -- squid < 7:2.5.STABLE7-5
535 %addusertogroup stats squid
536
537 %pre
538 if [ -n "`/usr/bin/getgid squid`" ]; then
539         if [ "`/usr/bin/getgid squid`" != "91" ]; then
540                 echo "Error: group squid doesn't have gid=91. Correct this before installing squid." 1>&2
541                 exit 1
542         fi
543 else
544         /usr/sbin/groupadd -g 91 squid 1>&2
545 fi
546 if [ -n "`/bin/id -u squid 2>/dev/null`" ]; then
547         if [ "`/bin/id -u squid`" != "91" ]; then
548                 echo "Error: user squid doesn't have uid=91. Correct this before installing squid." 1>&2
549                 exit 1
550         fi
551 else
552         /usr/sbin/useradd -o -u 91 -s /bin/false -g squid \
553                 -c "SQU http caching daemon" -d /var/cache/squid squid 1>&2
554         %addusertogroup stats squid
555 fi
556 [ -L %{_datadir}/squid/errors ] && rm -rf %{_datadir}/squid/errors || :
557
558 %post
559 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
560         echo visible_hostname `/bin/hostname -f` >> /etc/squid/squid.conf
561 fi
562
563 if [ "$1" = "1" ]; then
564         /sbin/chkconfig --add squid
565         echo "Run \"/etc/rc.d/init.d/squid start\" to start squid." >&2
566 else
567         if [ -f /var/lock/subsys/squid ]; then
568                 /etc/rc.d/init.d/squid restart >&2
569         fi
570 fi
571
572 %preun
573 if [ "$1" = "0" ]; then
574         if [ -f /var/lock/subsys/squid ]; then
575                 /etc/rc.d/init.d/squid stop >&2
576         fi
577         /sbin/chkconfig --del squid
578 fi
579
580 %postun
581 if [ "$1" = "0" ]; then
582         %userremove squid
583         %groupremove squid
584 fi
585
586 %files
587 %defattr(644,root,root,755)
588 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
589 %doc doc/* src/mib.txt FAQ*.html book-full.html
590 %attr(755,root,root) %{_bindir}/squidclient
591 %attr(755,root,root) %{_libexecdir}/diskd
592 # YES, it has to be suid root, it sends ICMP packets.
593 %attr(4754,root,squid) %{_libexecdir}/pinger
594 %attr(755,root,root) %{_libexecdir}/unlinkd
595 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
596 %attr(755,root,root) %{_sbindir}/*
597
598 %attr(755,root,root) %dir %{_sysconfdir}
599
600 %attr(754,root,root) /etc/rc.d/init.d/squid
601 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/squid
602 %attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
603 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
604 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
605 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
606 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
607
608 %dir %{_datadir}/squid
609 %dir %{_datadir}/squid/errors
610 %{_datadir}/squid/icons
611 %{_datadir}/squid/mib.txt
612 %lang(bg) %{_datadir}/squid/errors/Bulgarian
613 %lang(ca) %{_datadir}/squid/errors/Catalan
614 %lang(cs) %{_datadir}/squid/errors/Czech
615 %lang(da) %{_datadir}/squid/errors/Danish
616 %lang(nl) %{_datadir}/squid/errors/Dutch
617 %{_datadir}/squid/errors/English
618 %lang(et) %{_datadir}/squid/errors/Estonian
619 %lang(fi) %{_datadir}/squid/errors/Finnish
620 %lang(fr) %{_datadir}/squid/errors/French
621 %lang(de) %{_datadir}/squid/errors/German
622 %lang(he) %{_datadir}/squid/errors/Hebrew
623 %lang(hu) %{_datadir}/squid/errors/Hungarian
624 %lang(it) %{_datadir}/squid/errors/Italian
625 %lang(ja) %{_datadir}/squid/errors/Japanese
626 %lang(ko) %{_datadir}/squid/errors/Korean
627 %lang(lt) %{_datadir}/squid/errors/Lithuanian
628 %lang(pl) %{_datadir}/squid/errors/Polish
629 %lang(pt) %{_datadir}/squid/errors/Portuguese
630 %lang(ro) %{_datadir}/squid/errors/Romanian
631 %lang(ru) %{_datadir}/squid/errors/Russian-1251
632 %lang(ru) %{_datadir}/squid/errors/Russian-koi8-r
633 %lang(zh_CN) %{_datadir}/squid/errors/Simplify_Chinese
634 %lang(sk) %{_datadir}/squid/errors/Slovak
635 %lang(es) %{_datadir}/squid/errors/Spanish
636 %lang(sr) %{_datadir}/squid/errors/Serbian
637 %lang(sv) %{_datadir}/squid/errors/Swedish
638 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
639 %lang(tr) %{_datadir}/squid/errors/Turkish
640
641 %attr(755,root,root) %dir %{_libexecdir}
642 %attr(755,root,root) %{_libexecdir}/*.pl
643 %attr(755,root,root) %{_libexecdir}/contrib
644
645 %attr(770,root,squid) %dir /var/log/archiv/squid
646 %attr(770,root,squid) %dir /var/log/squid
647 %attr(660,root,squid) %ghost /var/log/squid/*
648
649 %attr(770,root,squid) %dir /var/cache/squid
650 %{_mandir}/man8/squid.8*
651
652 %files cachemgr
653 %defattr(644,root,root,755)
654 %attr(755,root,root) %{_cgidir}/*
655
656 %files ldap_auth
657 %defattr(644,root,root,755)
658 %doc helpers/basic_auth/LDAP/README
659 %attr(755,root,root) %{_libexecdir}/%{name}_ldap_auth
660 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_auth.*
661
662 %files pam_auth
663 %defattr(644,root,root,755)
664 %doc helpers/basic_auth/PAM/pam_auth.c
665 %config(noreplace) /etc/pam.d/squid
666 %config(noreplace) /etc/security/blacklist.squid
667 %attr(755,root,root) %{_libexecdir}/pam_auth
668 %{_mandir}/man8/pam_auth.8*
669
670 %files smb_auth
671 %defattr(644,root,root,755)
672 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
673 %doc helpers/basic_auth/multi-domain-NTLM/*
674 %attr(755,root,root) %{_libexecdir}/smb_auth*
675
676 %files msnt_auth
677 %defattr(644,root,root,755)
678 %doc helpers/basic_auth/MSNT/README*
679 %attr(755,root,root) %{_libexecdir}/msnt_auth
680 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
681
682 %files yp_auth
683 %defattr(644,root,root,755)
684 %attr(755,root,root) %{_libexecdir}/yp_auth
685
686 %files ncsa_auth
687 %defattr(644,root,root,755)
688 %attr(755,root,root) %{_libexecdir}/ncsa_auth
689
690 %files sasl_auth
691 %defattr(644,root,root,755)
692 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
693 %attr(755,root,root) %{_libexecdir}/sasl_auth
694
695 %files winbind_auth
696 %defattr(644,root,root,755)
697 %attr(755,root,root) %{_libexecdir}/wb_auth
698
699 %files getpwname_auth
700 %defattr(644,root,root,755)
701 %attr(755,root,root) %{_libexecdir}/getpwname_auth
702
703 %files passwd_auth
704 %defattr(644,root,root,755)
705 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
706
707 %files ntlm_auth
708 %defattr(644,root,root,755)
709 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
710 %attr(755,root,root) %{_libexecdir}/wb_ntlmauth
711 %attr(755,root,root) %{_libexecdir}/ntlm_auth
712
713 %files ip_acl
714 %defattr(644,root,root,755)
715 %doc helpers/external_acl/ip_user/{README,example*}
716 %attr(755,root,root) %{_libexecdir}/ip_user_check
717
718 %files ldap_acl
719 %defattr(644,root,root,755)
720 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
721 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_group.*
722
723 %files unix_acl
724 %defattr(644,root,root,755)
725 %doc helpers/external_acl/unix_group/README
726 %attr(755,root,root) %{_libexecdir}/squid_unix_group
727 %attr(644,root,root) %{_mandir}/man8/%{name}_unix_group.*
728
729 %files wbinfo_acl
730 %defattr(644,root,root,755)
731 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
732
733 %files winbind_acl
734 %defattr(644,root,root,755)
735 %doc helpers/external_acl/winbind_group/readme.txt
736 %attr(755,root,root) %{_libexecdir}/wb_group
This page took 0.099155 seconds and 4 git commands to generate.