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