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