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