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