]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
- fixed typo in init script
[packages/squid.git] / squid.spec
1 #
2 # Conditional build:
3 %bcond_with     combined_log    # enables apache-like combined log format
4 #
5 Summary:        SQUID Internet Object Cache
6 Summary(es):    proxy/cache para www/ftp/gopher
7 Summary(pl):    Uniwersalny proxy-cache server
8 Summary(pt_BR): Cache Squid de objetos Internet
9 Summary(ru):    Squid - ËÜÛ ÏÂßÅËÔÏ× Internet
10 Summary(uk):    Squid - ËÅÛ ÏÂ'¤ËԦנInternet
11 Summary(zh_CN): SQUID ¸ßËÙ»º³å´úÀí·þÎñÆ÷
12 Name:           squid
13 Version:        2.5.STABLE6
14 Release:        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:  7fd964ac27b43b613d6b981cc702a29e
20 Source1:        %{name}-1.1.19-faq.tar.gz
21 # Source1-md5:  77d04ae621d19548797e3a0deb540df6
22 Source2:        %{name}.init
23 Source3:        %{name}.sysconfig
24 Source4:        http://cache.is.co.za/%{name}-docs.tar.gz
25 # Source4-md5:  0cfee556bf6394a0bd3c438c89dd2e63
26 Source5:        %{name}.conf.patch
27 Source6:        %{name}.logrotate
28 Source7:        %{name}.pamd
29 # Bug fixes from Squid home page:
30 Patch0:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-ntlm_challengereuse_leak.patch
31 Patch1:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-ntlm_noreuse_leak.patch
32 Patch2:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-client_db_gc.patch
33 Patch3:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-heap_segfault.patch
34 Patch4:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-ntlm_fetch_string.patch
35
36 # Other patches:
37 Patch110:       http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
38 Patch120:       %{name}-fhs.patch
39 Patch130:       %{name}-location.patch
40 Patch140:       %{name}-domainmatch.patch
41 Patch150:       %{name}-libnsl_fixes.patch
42 Patch170:       %{name}-ac_fix.patch
43 Patch180:       %{name}-crash-on-ENOSPC.patch
44 Patch190:       %{name}-newssl.patch
45 Patch210:       http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
46 Patch220:       %{name}-empty-referer.patch
47 Patch230:       %{name}-2.5.STABLE4-apache-like-combined-log.patch
48 URL:            http://www.squid-cache.org/
49 BuildRequires:  autoconf
50 BuildRequires:  automake
51 BuildRequires:  cyrus-sasl-devel >= 2.1.0
52 BuildRequires:  findutils
53 BuildRequires:  openldap-devel
54 BuildRequires:  openssl-devel >= 0.9.7d
55 BuildRequires:  pam-devel
56 BuildRequires:  perl-base
57 PreReq:         rc-scripts >= 0.2.0
58 Requires(pre):  /bin/id
59 Requires(pre):  /usr/bin/getgid
60 Requires(pre):  /usr/sbin/groupadd
61 Requires(pre):  /usr/sbin/useradd
62 Requires(post,preun):   /sbin/chkconfig
63 Requires(post): fileutils
64 Requires(post): findutils
65 Requires(post): grep
66 Requires(post): /bin/hostname
67 Requires(postun):       /usr/sbin/groupdel
68 Requires(postun):       /usr/sbin/userdel
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 acces 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 acces 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 acces 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 acces for users based on NT domain group membership using wbinfo.
395
396
397 %description wbinfo_acl -l pl
398 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
399 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
400 przynale¿no¶ci do grup w domenie NT przy u¿yciu wbinfo.
401
402 %package winbind_acl
403 Summary:        NT domain group external ACL helper for Squid
404 Summary(pl):    Wsparcie kontroli dostêpu przez grupy w domenie NT dla squida
405 Group:          Networking/Admin
406 Requires:       %{name} = %{epoch}:%{version}-%{release}
407
408 %description winbind_acl
409 This is an external ACL module for the Squid proxy server to limit
410 acces for users based on NT domain group membership based on Samba
411 Winbindd from Samba 2.2.4 or greater.
412
413 %description winbind_acl -l pl
414 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
415 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
416 przynale¿no¶ci do grup w domenie NT oparty na Samba Winbindd z pakietu
417 Samba 2.2.4 lub wy¿szego.
418
419 %prep
420 %setup -q -a 1 -a 4
421
422 # Bug fixes from Squid home page:
423 %patch0 -p1
424 %patch1 -p1
425 %patch2 -p1
426 %patch3 -p1
427 %patch4 -p1
428
429 # Other patches:
430 %patch110 -p1
431 %patch120 -p1
432 %patch130 -p1
433 %patch140 -p1
434 %patch170 -p1
435 %patch180 -p1
436 %patch190 -p1
437 %patch210 -p1
438 %patch220 -p1
439 %{?with_combined_log:%patch230 -p1}
440
441 %build
442 %{__aclocal}
443 %{__autoconf}
444 %{__automake}
445 %configure \
446         --datadir=%{_datadir}/squid \
447         --disable-ipf-transparent \
448         --enable-arp-acl \
449         --enable-auth=yes \
450         --enable-basic-auth-helpers=yes \
451         --enable-cache-digests \
452         --enable-carp \
453         --enable-delay-pools \
454         --enable-digest-auth-helpers=yes \
455         --enable-err-language=English \
456         --enable-external-acl-helpers=yes \
457         --enable-forw-via-db \
458         --enable-htcp \
459         --enable-icmp \
460         --enable-linux-netfilter \
461         --enable-ntlm-auth-helpers=yes \
462         --enable-referer-log \
463         --enable-removal-policies="lru heap" \
464         --enable-ssl \
465         --enable-snmp \
466         --enable-storeio="aufs,coss,diskd,null,ufs" \
467         --enable-underscores \
468         --enable-useragent-log \
469         --enable-x-accelerator-vary \
470         --localstatedir=/var \
471         --sysconfdir=%{_sysconfdir} \
472         --with-pthreads
473
474 mv -f squid/* doc
475 %{__make}
476
477 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' contrib/*
478 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' scripts/*
479 find helpers/ -type f | xargs perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g'
480
481 %install
482 rm -rf $RPM_BUILD_ROOT
483 install -d $RPM_BUILD_ROOT%{_cgidir} \
484         $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
485         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
486         $RPM_BUILD_ROOT%{_mandir}/man8 \
487         $RPM_BUILD_ROOT%{_datadir}/squid \
488         $RPM_BUILD_ROOT/var/{cache,log{,/archiv}}/squid
489
490 %{__make} install \
491         DESTDIR=$RPM_BUILD_ROOT
492
493 cp -a contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
494 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
495
496 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
497 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
498
499 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
500
501 cd $RPM_BUILD_ROOT/etc/squid
502 cp -f squid.conf{,.default}
503 patch -p0 < %{SOURCE5}
504 cd -
505
506 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
507 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
508 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
509
510 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
511
512 # These two files start squid. They are replaced by /etc/rc.d/init.d script.
513 rm -f $RPM_BUILD_ROOT%{_bindir}/R*
514
515 # dunno why, but manual is not installed
516 mv doc/squid.8 $RPM_BUILD_ROOT%{_mandir}/man8
517
518 # We don't want Makefiles as docs...
519 rm -f doc/Makefile*
520
521 # We don't like message: rpm found unpackaged files ...
522 rm -f     $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
523     $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
524
525 %clean
526 rm -rf $RPM_BUILD_ROOT
527
528 %pre
529 if [ -n "`getgid squid`" ]; then
530         if [ "`getgid squid`" != "91" ]; then
531                 echo "Error: group squid doesn't have gid=91. Correct this before installing squid." 1>&2
532                 exit 1
533         fi
534 else
535         /usr/sbin/groupadd -g 91 squid 1>&2 || :
536 fi
537 if [ -n "`id -u squid 2>/dev/null`" ]; then
538         if [ "`id -u squid`" != "91" ]; then
539                 echo "Error: user squid doesn't have uid=91. Correct this before installing squid." 1>&2
540                 exit 1
541         fi
542 else
543         /usr/sbin/useradd -M -o -u 91 -s /bin/false \
544                 -g squid -c "SQU http caching daemon" -d /var/cache/squid squid 1>&2 || :
545 fi
546 [ -L %{_datadir}/squid/errors ] && rm -rf %{_datadir}/squid/errors || :
547
548 %post
549 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
550         echo visible_hostname `/bin/hostname -f` >> /etc/squid/squid.conf
551 fi
552
553 if [ "$1" = "1" ]; then
554         /sbin/chkconfig --add squid
555         echo "Run \"/etc/rc.d/init.d/squid start\" to start squid." >&2
556 else
557         if [ -f /var/lock/subsys/squid ]; then
558                 /etc/rc.d/init.d/squid restart >&2
559         fi
560 fi
561
562 %preun
563 if [ "$1" = "0" ]; then
564         if [ -f /var/lock/subsys/squid ]; then
565                 /etc/rc.d/init.d/squid stop >&2
566         fi
567         /sbin/chkconfig --del squid
568 fi
569
570 %postun
571 if [ "$1" = "0" ]; then
572         /usr/sbin/userdel squid
573         /usr/sbin/groupdel squid
574 fi
575
576 %files
577 %defattr(644,root,root,755)
578 %doc faq CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART
579 %doc RELEASENOTES.html SPONSORS doc/* src/mib.txt
580 %attr(755,root,root) %{_bindir}/squidclient
581 %attr(755,root,root) %{_libexecdir}/diskd
582 # YES, it has to be suid root, it sends ICMP packets.
583 %attr(4754,root,squid) %{_libexecdir}/pinger
584 %attr(755,root,root) %{_libexecdir}/unlinkd
585 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
586 %attr(755,root,root) %{_sbindir}/*
587
588 %attr(755,root,root) %dir %{_sysconfdir}
589
590 %attr(754,root,root) /etc/rc.d/init.d/squid
591 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/squid
592 %attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
593 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
594 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
595 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
596 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
597
598 %dir %{_datadir}/squid
599 %dir %{_datadir}/squid/errors
600 %{_datadir}/squid/icons
601 %{_datadir}/squid/mib.txt
602 %lang(bg) %{_datadir}/squid/errors/Bulgarian
603 %lang(ca) %{_datadir}/squid/errors/Catalan
604 %lang(cs) %{_datadir}/squid/errors/Czech
605 %lang(da) %{_datadir}/squid/errors/Danish
606 %lang(nl) %{_datadir}/squid/errors/Dutch
607 %{_datadir}/squid/errors/English
608 %lang(et) %{_datadir}/squid/errors/Estonian
609 %lang(fi) %{_datadir}/squid/errors/Finnish
610 %lang(fr) %{_datadir}/squid/errors/French
611 %lang(de) %{_datadir}/squid/errors/German
612 %lang(he) %{_datadir}/squid/errors/Hebrew
613 %lang(hu) %{_datadir}/squid/errors/Hungarian
614 %lang(it) %{_datadir}/squid/errors/Italian
615 %lang(ja) %{_datadir}/squid/errors/Japanese
616 %lang(ko) %{_datadir}/squid/errors/Korean
617 %lang(lt) %{_datadir}/squid/errors/Lithuanian
618 %lang(pl) %{_datadir}/squid/errors/Polish
619 %lang(pt) %{_datadir}/squid/errors/Portuguese
620 %lang(ro) %{_datadir}/squid/errors/Romanian
621 %lang(ru) %{_datadir}/squid/errors/Russian-1251
622 %lang(ru) %{_datadir}/squid/errors/Russian-koi8-r
623 %lang(zh_CN) %{_datadir}/squid/errors/Simplify_Chinese
624 %lang(sk) %{_datadir}/squid/errors/Slovak
625 %lang(es) %{_datadir}/squid/errors/Spanish
626 %lang(sr) %{_datadir}/squid/errors/Serbian
627 %lang(sv) %{_datadir}/squid/errors/Swedish
628 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
629 %lang(tr) %{_datadir}/squid/errors/Turkish
630
631 %attr(755,root,root) %dir %{_libexecdir}
632 %attr(755,root,root) %{_libexecdir}/*.pl
633 %attr(755,root,root) %{_libexecdir}/contrib
634
635 %attr(770,root,squid) %dir /var/log/archiv/squid
636 %attr(770,root,squid) %dir /var/log/squid
637 %attr(660,root,squid) %ghost /var/log/squid/*
638
639 %attr(770,root,squid) %dir /var/cache/squid
640 %{_mandir}/man8/squid.8*
641
642 %files cachemgr
643 %defattr(644,root,root,755)
644 %attr(755,root,root) %{_cgidir}/*
645
646 %files ldap_auth
647 %defattr(644,root,root,755)
648 %doc helpers/basic_auth/LDAP/README
649 %attr(755,root,root) %{_libexecdir}/%{name}_ldap_auth
650 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_auth.*
651
652 %files pam_auth
653 %defattr(644,root,root,755)
654 %doc helpers/basic_auth/PAM/pam_auth.c
655 %config(noreplace) /etc/pam.d/squid
656 %config(noreplace) /etc/security/blacklist.squid
657 %attr(755,root,root) %{_libexecdir}/pam_auth
658 %{_mandir}/man8/pam_auth.8*
659
660 %files smb_auth
661 %defattr(644,root,root,755)
662 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
663 %doc helpers/basic_auth/multi-domain-NTLM/*
664 %attr(755,root,root) %{_libexecdir}/smb_auth*
665
666 %files msnt_auth
667 %defattr(644,root,root,755)
668 %doc helpers/basic_auth/MSNT/README*
669 %attr(755,root,root) %{_libexecdir}/msnt_auth
670 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
671
672 %files yp_auth
673 %defattr(644,root,root,755)
674 %attr(755,root,root) %{_libexecdir}/yp_auth
675
676 %files ncsa_auth
677 %defattr(644,root,root,755)
678 %attr(755,root,root) %{_libexecdir}/ncsa_auth
679
680 %files sasl_auth
681 %defattr(644,root,root,755)
682 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
683 %attr(755,root,root) %{_libexecdir}/sasl_auth
684
685 %files winbind_auth
686 %defattr(644,root,root,755)
687 %attr(755,root,root) %{_libexecdir}/wb_auth
688
689 %files getpwname_auth
690 %defattr(644,root,root,755)
691 %attr(755,root,root) %{_libexecdir}/getpwname_auth
692
693 %files passwd_auth
694 %defattr(644,root,root,755)
695 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
696
697 %files ntlm_auth
698 %defattr(644,root,root,755)
699 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
700 %attr(755,root,root) %{_libexecdir}/wb_ntlmauth
701 %attr(755,root,root) %{_libexecdir}/ntlm_auth
702
703 %files ip_acl
704 %defattr(644,root,root,755)
705 %doc helpers/external_acl/ip_user/{README,example*}
706 %attr(755,root,root) %{_libexecdir}/ip_user_check
707
708 %files ldap_acl
709 %defattr(644,root,root,755)
710 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
711 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_group.*
712
713 %files unix_acl
714 %defattr(644,root,root,755)
715 %doc helpers/external_acl/unix_group/README
716 %attr(755,root,root) %{_libexecdir}/squid_unix_group
717 %attr(644,root,root) %{_mandir}/man8/%{name}_unix_group.*
718
719 %files wbinfo_acl
720 %defattr(644,root,root,755)
721 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
722
723 %files winbind_acl
724 %defattr(644,root,root,755)
725 %doc helpers/external_acl/winbind_group/readme.txt
726 %attr(755,root,root) %{_libexecdir}/wb_group
This page took 0.129938 seconds and 4 git commands to generate.