]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
- rel.4 - added official hierarchy_tag patch
[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 serwer proxy-cache
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.STABLE14
14 Release:        4
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:  f413e0b887a5f9b2a75350243ed5564c
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, please include URL
32 Patch10:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE14-httpReplyDestroy.patch
33 Patch11:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE14-hierarchy_tag.patch
34 # Other patches:
35 Patch100:       http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
36 Patch101:       %{name}-fhs.patch
37 Patch102:       %{name}-location.patch
38 Patch103:       %{name}-domainmatch.patch
39 Patch104:       %{name}-libnsl_fixes.patch
40 Patch105:       %{name}-ac_fix.patch
41 Patch106:       %{name}-crash-on-ENOSPC.patch
42 Patch107:       %{name}-newssl.patch
43 Patch108:       %{name}-nolibs.patch
44 Patch109:       http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
45 Patch110:       %{name}-empty-referer.patch
46 Patch111:       %{name}-align.patch
47 Patch112:       %{name}-2.5.STABLE4-apache-like-combined-log.patch
48 Patch113:       %{name}-auth_on_acceleration.patch
49 Patch114:       %{name}-fd-config.patch
50 Patch115:       %{name}-no-u_short.patch
51 URL:            http://www.squid-cache.org/
52 BuildRequires:  autoconf
53 BuildRequires:  automake
54 BuildRequires:  cyrus-sasl-devel >= 2.1.0
55 BuildRequires:  openldap-devel >= 2.3.0
56 BuildRequires:  openssl-devel >= 0.9.7d
57 BuildRequires:  pam-devel
58 BuildRequires:  perl-base
59 BuildRequires:  rpmbuild(macros) >= 1.268
60 BuildRequires:  sed >= 4.0
61 BuildRequires:  unzip
62 Requires(post): /bin/hostname
63 Requires(post): fileutils
64 Requires(post): findutils
65 Requires(post): grep
66 Requires(post,preun):   /sbin/chkconfig
67 Requires(postun):       /usr/sbin/groupdel
68 Requires(postun):       /usr/sbin/userdel
69 Requires(pre):  /bin/id
70 Requires(pre):  /usr/bin/getgid
71 Requires(pre):  /usr/lib/rpm/user_group.sh
72 Requires(pre):  /usr/sbin/groupadd
73 Requires(pre):  /usr/sbin/useradd
74 Requires:       rc-scripts >= 0.2.0
75 Requires:       setup >= 2.4.6
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:       webserver
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 %package scripts
428 Summary:        Perl scripts for Squid
429 Summary(pl):    Skrypty perlowe dla Squida
430 Group:          Networking/Admin
431 Requires:       %{name} = %{epoch}:%{version}-%{release}
432
433 %description scripts
434 This package contains Perl scripts and contributed programs for Squid.
435
436 %description scripts -l pl
437 Ten pakiet zawiera skrypty perlowe i dodatkowe programy dla Squida.
438
439 %prep
440 %setup -q -a1 -a4
441 # Bug fixes from Squid home page:
442 %patch10 -p1
443 %patch11 -p1
444 # Other patches:
445 %patch100 -p1
446 %patch101 -p1
447 %patch102 -p1
448 %patch103 -p1
449 %patch104 -p1
450 %patch105 -p1
451 %patch106 -p1
452 %patch107 -p1
453 %patch108 -p1
454 %patch109 -p1
455 %patch110 -p1
456 %patch111 -p1
457 %{?with_combined_log:%patch112 -p1}
458 %patch113 -p1
459 %patch114 -p1
460 %patch115 -p1
461
462 %{__sed} -i -e '1s#!.*bin/perl#!%{__perl}#' {contrib,scripts,helpers/*/*}/*.pl
463
464 %build
465 %{__aclocal}
466 %{__autoconf}
467 %{__autoheader}
468 %{__automake}
469 %configure \
470         --datadir=%{_datadir}/squid \
471         --disable-ipf-transparent \
472         --enable-arp-acl \
473         --enable-auth=yes \
474         --enable-basic-auth-helpers=yes \
475         --enable-cache-digests \
476         --enable-carp \
477         --enable-delay-pools \
478         --enable-digest-auth-helpers=yes \
479         --enable-err-language=English \
480         --enable-external-acl-helpers=yes \
481         --enable-forw-via-db \
482         --enable-htcp \
483         --enable-icmp \
484         --enable-linux-netfilter \
485         --enable-ntlm-auth-helpers=yes \
486         --enable-referer-log \
487         --enable-removal-policies="lru heap" \
488         --enable-ssl \
489         --enable-snmp \
490         --enable-storeio="aufs,coss,diskd,null,ufs" \
491         --enable-underscores \
492         --enable-useragent-log \
493         --enable-x-accelerator-vary \
494         --localstatedir=/var \
495         --sysconfdir=%{_sysconfdir} \
496         --with-auth-on-acceleration \
497         --with-pthreads \
498         --enable-fd-config
499
500 %{__make}
501
502 %install
503 rm -rf $RPM_BUILD_ROOT
504 install -d $RPM_BUILD_ROOT%{_cgidir} \
505         $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
506         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
507         $RPM_BUILD_ROOT%{_mandir}/man8 \
508         $RPM_BUILD_ROOT%{_datadir}/squid \
509         $RPM_BUILD_ROOT/var/{cache,log{,/archiv}}/squid
510
511 %{__make} install \
512         DESTDIR=$RPM_BUILD_ROOT
513
514 cp -a contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
515 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
516
517 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
518 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
519
520 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
521
522 cd $RPM_BUILD_ROOT/etc/squid
523 cp -f squid.conf{,.default}
524 patch -p0 < %{SOURCE5}
525 cd -
526
527 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
528 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
529 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
530
531 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
532
533 # These two files start squid. They are replaced by /etc/rc.d/init.d script.
534 rm -f $RPM_BUILD_ROOT%{_bindir}/R*
535
536 # cp, to have re-entrant install
537 rm -rf docs
538 cp -a doc docs
539 # dunno why, but manual is not installed
540 mv docs/squid.8 $RPM_BUILD_ROOT%{_mandir}/man8
541 # We don't want Makefiles as docs...
542 rm -f docs/Makefile*
543
544 # We don't like message: rpm found unpackaged files ...
545 rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
546         $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
547
548 > $RPM_BUILD_ROOT/var/cache/squid/netdb_state
549 > $RPM_BUILD_ROOT/var/cache/squid/swap.state
550 > $RPM_BUILD_ROOT/var/cache/squid/swap.state.clean
551 > $RPM_BUILD_ROOT/var/cache/squid/swap.state.last-clean
552
553 %clean
554 rm -rf $RPM_BUILD_ROOT
555
556 %pre
557 %groupadd -g 91 squid
558 %useradd -o -u 91 -s /bin/false -g squid -c "SQUID http caching daemon" -d /var/cache/squid squid
559 %addusertogroup stats squid
560
561 [ -L %{_datadir}/squid/errors ] && rm -f %{_datadir}/squid/errors || :
562
563 %post
564 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
565         hostname=`/bin/hostname -f 2>/dev/null` || hostname='localhost'
566         echo visible_hostname $hostname >> /etc/squid/squid.conf
567 fi
568
569 /sbin/chkconfig --add squid
570 if [ "$1" = "1" ]; then
571         /sbin/service squid init >&2
572 fi
573 %service squid restart
574
575 %preun
576 if [ "$1" = "0" ]; then
577         /sbin/chkconfig --del squid
578         %service squid stop
579
580         # nuke squid cache if uninstalling
581         rm -rf /var/cache/squid/??
582 fi
583
584 %postun
585 if [ "$1" = "0" ]; then
586         %userremove squid
587         %groupremove squid
588 fi
589
590 %triggerpostun -- squid < 7:2.5.STABLE7-5
591 %addusertogroup stats squid
592
593 %files
594 %defattr(644,root,root,755)
595 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
596 %doc docs/* src/mib.txt FAQ*.html book-full.html
597 %attr(755,root,root) %{_bindir}/squidclient
598 %attr(755,root,root) %{_libexecdir}/diskd
599 # YES, it has to be suid root, it sends ICMP packets.
600 %attr(4754,root,squid) %{_libexecdir}/pinger
601 %attr(755,root,root) %{_libexecdir}/unlinkd
602 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
603 %attr(755,root,root) %{_sbindir}/*
604
605 %attr(755,root,root) %dir %{_sysconfdir}
606
607 %attr(754,root,root) /etc/rc.d/init.d/squid
608 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
609 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/squid
610 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
611 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
612 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
613 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
614
615 %dir %{_datadir}/squid
616 %dir %{_datadir}/squid/errors
617 %{_datadir}/squid/icons
618 %{_datadir}/squid/mib.txt
619 %lang(bg) %{_datadir}/squid/errors/Bulgarian
620 %lang(ca) %{_datadir}/squid/errors/Catalan
621 %lang(cs) %{_datadir}/squid/errors/Czech
622 %lang(da) %{_datadir}/squid/errors/Danish
623 %lang(nl) %{_datadir}/squid/errors/Dutch
624 %{_datadir}/squid/errors/English
625 %lang(et) %{_datadir}/squid/errors/Estonian
626 %lang(fi) %{_datadir}/squid/errors/Finnish
627 %lang(fr) %{_datadir}/squid/errors/French
628 %lang(de) %{_datadir}/squid/errors/German
629 %lang(el) %{_datadir}/squid/errors/Greek
630 %lang(he) %{_datadir}/squid/errors/Hebrew
631 %lang(hu) %{_datadir}/squid/errors/Hungarian
632 %lang(it) %{_datadir}/squid/errors/Italian
633 %lang(ja) %{_datadir}/squid/errors/Japanese
634 %lang(ko) %{_datadir}/squid/errors/Korean
635 %lang(lt) %{_datadir}/squid/errors/Lithuanian
636 %lang(pl) %{_datadir}/squid/errors/Polish
637 %lang(pt) %{_datadir}/squid/errors/Portuguese
638 %lang(ro) %{_datadir}/squid/errors/Romanian
639 %lang(ru) %{_datadir}/squid/errors/Russian-1251
640 %lang(ru) %{_datadir}/squid/errors/Russian-koi8-r
641 %lang(zh_CN) %{_datadir}/squid/errors/Simplify_Chinese
642 %lang(sk) %{_datadir}/squid/errors/Slovak
643 %lang(es) %{_datadir}/squid/errors/Spanish
644 %lang(sr) %{_datadir}/squid/errors/Serbian
645 %lang(sv) %{_datadir}/squid/errors/Swedish
646 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
647 %lang(tr) %{_datadir}/squid/errors/Turkish
648
649 %attr(755,root,root) %dir %{_libexecdir}
650
651 %attr(770,root,squid) %dir /var/log/archiv/squid
652 %attr(770,root,squid) %dir /var/log/squid
653 %attr(660,root,squid) %ghost /var/log/squid/*
654
655 %attr(770,root,squid) %dir /var/cache/squid
656 %ghost /var/cache/squid/netdb_state
657 %ghost /var/cache/squid/swap.state
658 %ghost /var/cache/squid/swap.state.clean
659 %ghost /var/cache/squid/swap.state.last-clean
660 %{_mandir}/man8/squid.8*
661
662 %files cachemgr
663 %defattr(644,root,root,755)
664 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cachemgr.conf
665 %attr(755,root,root) %{_cgidir}/*
666 %{_mandir}/man8/cachemgr.cgi.8*
667
668 %files ldap_auth
669 %defattr(644,root,root,755)
670 %doc helpers/basic_auth/LDAP/README
671 %attr(755,root,root) %{_libexecdir}/%{name}_ldap_auth
672 %{_mandir}/man8/%{name}_ldap_auth.*
673
674 %files pam_auth
675 %defattr(644,root,root,755)
676 %doc helpers/basic_auth/PAM/pam_auth.c
677 %config(noreplace) /etc/pam.d/squid
678 %config(noreplace) /etc/security/blacklist.squid
679 %attr(755,root,root) %{_libexecdir}/pam_auth
680 %{_mandir}/man8/pam_auth.8*
681
682 %files smb_auth
683 %defattr(644,root,root,755)
684 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
685 %doc helpers/basic_auth/multi-domain-NTLM/*
686 %attr(755,root,root) %{_libexecdir}/smb_auth*
687
688 %files msnt_auth
689 %defattr(644,root,root,755)
690 %doc helpers/basic_auth/MSNT/README*
691 %attr(755,root,root) %{_libexecdir}/msnt_auth
692 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
693
694 %files yp_auth
695 %defattr(644,root,root,755)
696 %attr(755,root,root) %{_libexecdir}/yp_auth
697
698 %files ncsa_auth
699 %defattr(644,root,root,755)
700 %attr(755,root,root) %{_libexecdir}/ncsa_auth
701
702 %files sasl_auth
703 %defattr(644,root,root,755)
704 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
705 %attr(755,root,root) %{_libexecdir}/sasl_auth
706
707 %files winbind_auth
708 %defattr(644,root,root,755)
709 %attr(755,root,root) %{_libexecdir}/wb_auth
710
711 %files getpwname_auth
712 %defattr(644,root,root,755)
713 %attr(755,root,root) %{_libexecdir}/getpwname_auth
714
715 %files passwd_auth
716 %defattr(644,root,root,755)
717 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
718
719 %files ntlm_auth
720 %defattr(644,root,root,755)
721 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
722 %attr(755,root,root) %{_libexecdir}/wb_ntlmauth
723 %attr(755,root,root) %{_libexecdir}/ntlm_auth
724
725 %files ip_acl
726 %defattr(644,root,root,755)
727 %doc helpers/external_acl/ip_user/{README,example*}
728 %attr(755,root,root) %{_libexecdir}/ip_user_check
729
730 %files ldap_acl
731 %defattr(644,root,root,755)
732 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
733 %{_mandir}/man8/%{name}_ldap_group.*
734
735 %files unix_acl
736 %defattr(644,root,root,755)
737 %doc helpers/external_acl/unix_group/README
738 %attr(755,root,root) %{_libexecdir}/squid_unix_group
739 %{_mandir}/man8/%{name}_unix_group.*
740
741 %files wbinfo_acl
742 %defattr(644,root,root,755)
743 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
744
745 %files winbind_acl
746 %defattr(644,root,root,755)
747 %doc helpers/external_acl/winbind_group/readme.txt
748 %attr(755,root,root) %{_libexecdir}/wb_group
749
750 %files scripts
751 %defattr(644,root,root,755)
752 %attr(755,root,root) %{_libexecdir}/*.pl
753 %attr(755,root,root) %{_libexecdir}/contrib
This page took 0.126896 seconds and 4 git commands to generate.