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