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