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