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