]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
20ccb6258313b8f774c38df0d6deb70cb459fa90
[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.STABLE7
14 Release:        9
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:  bf63e34906c68d716896eec0351108dc
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.STABLE7-half_closed_POST.patch
33 Patch1:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7_req_resp_header.patch
34 Patch2:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-non_blocking_disk.patch
35 Patch3:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-blank_response.patch
36 Patch4:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-cachemgr_vmobjects.patch
37 Patch5:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-dothost.patch
38 Patch6:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-empty_acls.patch
39 # Other patches:
40 Patch100:       http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
41 Patch101:       %{name}-fhs.patch
42 Patch102:       %{name}-location.patch
43 Patch103:       %{name}-domainmatch.patch
44 Patch104:       %{name}-libnsl_fixes.patch
45 Patch105:       %{name}-ac_fix.patch
46 Patch106:       %{name}-crash-on-ENOSPC.patch
47 Patch107:       %{name}-newssl.patch
48 Patch108:       %{name}-nolibs.patch
49 Patch109:       http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
50 Patch110:       %{name}-empty-referer.patch
51 Patch111:       %{name}-2.5.STABLE4-apache-like-combined-log.patch
52 URL:            http://www.squid-cache.org/
53 BuildRequires:  autoconf
54 BuildRequires:  automake
55 BuildRequires:  cyrus-sasl-devel >= 2.1.0
56 BuildRequires:  openldap-devel
57 BuildRequires:  openssl-devel >= 0.9.7d
58 BuildRequires:  pam-devel
59 BuildRequires:  perl-base
60 BuildRequires:  rpmbuild(macros) >= 1.166
61 BuildRequires:  unzip
62 PreReq:         rc-scripts >= 0.2.0
63 PreReq:         setup >= 2.4.6
64 Requires(pre):  /bin/id
65 Requires(pre):  /usr/bin/getgid
66 Requires(pre):  /usr/lib/rpm/user_group.sh
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 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:       httpd
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 %prep
428 %setup -q -a1 -a4
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 # Other patches:
438 %patch100 -p1
439 %patch101 -p1
440 %patch102 -p1
441 %patch103 -p1
442 %patch104 -p1
443 %patch105 -p1
444 %patch106 -p1
445 %patch107 -p1
446 %patch108 -p1
447 %patch109 -p1
448 %patch110 -p1
449 %{?with_combined_log:%patch111 -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 %triggerpostun -- squid < 7:2.5.STABLE7-5
538 %addusertogroup stats squid
539
540 %pre
541 if [ -n "`/usr/bin/getgid squid`" ]; then
542         if [ "`/usr/bin/getgid squid`" != "91" ]; then
543                 echo "Error: group squid doesn't have gid=91. Correct this before installing squid." 1>&2
544                 exit 1
545         fi
546 else
547         /usr/sbin/groupadd -g 91 squid 1>&2
548 fi
549 if [ -n "`/bin/id -u squid 2>/dev/null`" ]; then
550         if [ "`/bin/id -u squid`" != "91" ]; then
551                 echo "Error: user squid doesn't have uid=91. Correct this before installing squid." 1>&2
552                 exit 1
553         fi
554 else
555         /usr/sbin/useradd -o -u 91 -s /bin/false -g squid \
556                 -c "SQUID http caching daemon" -d /var/cache/squid squid 1>&2
557         %addusertogroup stats squid
558 fi
559 [ -L %{_datadir}/squid/errors ] && rm -rf %{_datadir}/squid/errors || :
560
561 %post
562 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
563         echo visible_hostname `/bin/hostname -f` >> /etc/squid/squid.conf
564 fi
565
566 if [ "$1" = "1" ]; then
567         /sbin/chkconfig --add squid
568         echo "Run \"/etc/rc.d/init.d/squid start\" to start squid." >&2
569 else
570         if [ -f /var/lock/subsys/squid ]; then
571                 /etc/rc.d/init.d/squid restart >&2
572         fi
573 fi
574
575 %preun
576 if [ "$1" = "0" ]; then
577         if [ -f /var/lock/subsys/squid ]; then
578                 /etc/rc.d/init.d/squid stop >&2
579         fi
580         /sbin/chkconfig --del squid
581 fi
582
583 %postun
584 if [ "$1" = "0" ]; then
585         %userremove squid
586         %groupremove squid
587 fi
588
589 %files
590 %defattr(644,root,root,755)
591 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
592 %doc doc/* src/mib.txt FAQ*.html book-full.html
593 %attr(755,root,root) %{_bindir}/squidclient
594 %attr(755,root,root) %{_libexecdir}/diskd
595 # YES, it has to be suid root, it sends ICMP packets.
596 %attr(4754,root,squid) %{_libexecdir}/pinger
597 %attr(755,root,root) %{_libexecdir}/unlinkd
598 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
599 %attr(755,root,root) %{_sbindir}/*
600
601 %attr(755,root,root) %dir %{_sysconfdir}
602
603 %attr(754,root,root) /etc/rc.d/init.d/squid
604 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
605 %attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
606 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
607 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
608 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
609 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
610
611 %dir %{_datadir}/squid
612 %dir %{_datadir}/squid/errors
613 %{_datadir}/squid/icons
614 %{_datadir}/squid/mib.txt
615 %lang(bg) %{_datadir}/squid/errors/Bulgarian
616 %lang(ca) %{_datadir}/squid/errors/Catalan
617 %lang(cs) %{_datadir}/squid/errors/Czech
618 %lang(da) %{_datadir}/squid/errors/Danish
619 %lang(nl) %{_datadir}/squid/errors/Dutch
620 %{_datadir}/squid/errors/English
621 %lang(et) %{_datadir}/squid/errors/Estonian
622 %lang(fi) %{_datadir}/squid/errors/Finnish
623 %lang(fr) %{_datadir}/squid/errors/French
624 %lang(de) %{_datadir}/squid/errors/German
625 %lang(he) %{_datadir}/squid/errors/Hebrew
626 %lang(hu) %{_datadir}/squid/errors/Hungarian
627 %lang(it) %{_datadir}/squid/errors/Italian
628 %lang(ja) %{_datadir}/squid/errors/Japanese
629 %lang(ko) %{_datadir}/squid/errors/Korean
630 %lang(lt) %{_datadir}/squid/errors/Lithuanian
631 %lang(pl) %{_datadir}/squid/errors/Polish
632 %lang(pt) %{_datadir}/squid/errors/Portuguese
633 %lang(ro) %{_datadir}/squid/errors/Romanian
634 %lang(ru) %{_datadir}/squid/errors/Russian-1251
635 %lang(ru) %{_datadir}/squid/errors/Russian-koi8-r
636 %lang(zh_CN) %{_datadir}/squid/errors/Simplify_Chinese
637 %lang(sk) %{_datadir}/squid/errors/Slovak
638 %lang(es) %{_datadir}/squid/errors/Spanish
639 %lang(sr) %{_datadir}/squid/errors/Serbian
640 %lang(sv) %{_datadir}/squid/errors/Swedish
641 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
642 %lang(tr) %{_datadir}/squid/errors/Turkish
643
644 %attr(755,root,root) %dir %{_libexecdir}
645 %attr(755,root,root) %{_libexecdir}/*.pl
646 %attr(755,root,root) %{_libexecdir}/contrib
647
648 %attr(770,root,squid) %dir /var/log/archiv/squid
649 %attr(770,root,squid) %dir /var/log/squid
650 %attr(660,root,squid) %ghost /var/log/squid/*
651
652 %attr(770,root,squid) %dir /var/cache/squid
653 %{_mandir}/man8/squid.8*
654
655 %files cachemgr
656 %defattr(644,root,root,755)
657 %attr(755,root,root) %{_cgidir}/*
658
659 %files ldap_auth
660 %defattr(644,root,root,755)
661 %doc helpers/basic_auth/LDAP/README
662 %attr(755,root,root) %{_libexecdir}/%{name}_ldap_auth
663 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_auth.*
664
665 %files pam_auth
666 %defattr(644,root,root,755)
667 %doc helpers/basic_auth/PAM/pam_auth.c
668 %config(noreplace) /etc/pam.d/squid
669 %config(noreplace) /etc/security/blacklist.squid
670 %attr(755,root,root) %{_libexecdir}/pam_auth
671 %{_mandir}/man8/pam_auth.8*
672
673 %files smb_auth
674 %defattr(644,root,root,755)
675 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
676 %doc helpers/basic_auth/multi-domain-NTLM/*
677 %attr(755,root,root) %{_libexecdir}/smb_auth*
678
679 %files msnt_auth
680 %defattr(644,root,root,755)
681 %doc helpers/basic_auth/MSNT/README*
682 %attr(755,root,root) %{_libexecdir}/msnt_auth
683 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
684
685 %files yp_auth
686 %defattr(644,root,root,755)
687 %attr(755,root,root) %{_libexecdir}/yp_auth
688
689 %files ncsa_auth
690 %defattr(644,root,root,755)
691 %attr(755,root,root) %{_libexecdir}/ncsa_auth
692
693 %files sasl_auth
694 %defattr(644,root,root,755)
695 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
696 %attr(755,root,root) %{_libexecdir}/sasl_auth
697
698 %files winbind_auth
699 %defattr(644,root,root,755)
700 %attr(755,root,root) %{_libexecdir}/wb_auth
701
702 %files getpwname_auth
703 %defattr(644,root,root,755)
704 %attr(755,root,root) %{_libexecdir}/getpwname_auth
705
706 %files passwd_auth
707 %defattr(644,root,root,755)
708 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
709
710 %files ntlm_auth
711 %defattr(644,root,root,755)
712 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
713 %attr(755,root,root) %{_libexecdir}/wb_ntlmauth
714 %attr(755,root,root) %{_libexecdir}/ntlm_auth
715
716 %files ip_acl
717 %defattr(644,root,root,755)
718 %doc helpers/external_acl/ip_user/{README,example*}
719 %attr(755,root,root) %{_libexecdir}/ip_user_check
720
721 %files ldap_acl
722 %defattr(644,root,root,755)
723 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
724 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_group.*
725
726 %files unix_acl
727 %defattr(644,root,root,755)
728 %doc helpers/external_acl/unix_group/README
729 %attr(755,root,root) %{_libexecdir}/squid_unix_group
730 %attr(644,root,root) %{_mandir}/man8/%{name}_unix_group.*
731
732 %files wbinfo_acl
733 %defattr(644,root,root,755)
734 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
735
736 %files winbind_acl
737 %defattr(644,root,root,755)
738 %doc helpers/external_acl/winbind_group/readme.txt
739 %attr(755,root,root) %{_libexecdir}/wb_group
This page took 0.209526 seconds and 2 git commands to generate.