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