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