]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
46bde66c03facc41e8a1b69b04e2782ad7148be7
[packages/squid.git] / squid.spec
1 # TODO
2 # - REVIEW patches and configuration
3 # - ZPH TOS -
4 # For this to work correctly, you will need to patch your linux
5 # kernel with the TOS preserving ZPH patch.
6 # The kernel patch can be downloaded from http://zph.bratcheda.org
7 #
8 # Conditional build:
9 %bcond_with     combined_log    # enables apache-like combined log format
10 #
11 Summary:        SQUID Internet Object Cache
12 Summary(es.UTF-8):      proxy/cache para WWW/FTP/gopher
13 Summary(pl.UTF-8):      Uniwersalny serwer proxy-cache
14 Summary(pt_BR.UTF-8):   Cache Squid de objetos Internet
15 Summary(ru.UTF-8):      Squid - кэш объектов Internet
16 Summary(uk.UTF-8):      Squid - кеш об'єктів Internet
17 Summary(zh_CN.UTF-8):   SQUID 高速缓冲代理服务器
18 Name:           squid
19 Version:        3.1.8
20 # review patches before stable release
21 Release:        0.1
22 Epoch:          7
23 License:        GPL v2
24 Group:          Networking/Daemons
25 Source0:        http://www.squid-cache.org/Versions/v3/3.1/%{name}-%{version}.tar.bz2
26 # Source0-md5:  a8160dfba55ab7c400c622b72d39fc13
27 # http://www.squid-cache.org/Doc/FAQ/FAQ.tar.gz
28 Source1:        %{name}-FAQ.tar.gz
29 # Source1-md5:  cb9a955f8cda9cc166e086fccd412a43
30 Source2:        %{name}.init
31 Source3:        %{name}.sysconfig
32 # http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
33 Source4:        http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
34 # Source4-md5:  4f3b6dab1de9cbb847df89d8b417378a
35 Source5:        %{name}.conf.patch
36 Source6:        %{name}.logrotate
37 Source7:        %{name}.pamd
38 # Bug fixes from Squid home page, please include URL
39 # lets have fun - there is no patches... yet:)
40 # Other patches:
41 # http://zph.bratcheda.org/
42 Source8:        %{name}-cachemgr-apache.conf
43 Patch0:         %{name}-fhs.patch
44 Patch1:         %{name}-location.patch
45 Patch2:         %{name}-crash-on-ENOSPC.patch
46 Patch3:         %{name}-empty-referer.patch
47 Patch4:         %{name}-2.5.STABLE4-apache-like-combined-log.patch
48 Patch5:         %{name}-ppc-m32.patch
49 Patch6:         %{name}-cachemgr-webapp.patch
50 URL:            http://www.squid-cache.org/
51 BuildRequires:  autoconf
52 BuildRequires:  automake
53 BuildRequires:  cyrus-sasl-devel >= 2.1.0
54 BuildRequires:  db-devel
55 BuildRequires:  expat-devel
56 BuildRequires:  heimdal-devel
57 BuildRequires:  libcap-devel
58 BuildRequires:  libltdl-devel
59 BuildRequires:  libxml2-devel
60 BuildRequires:  openldap-devel >= 2.3.0
61 BuildRequires:  openssl-devel >= 0.9.7d
62 BuildRequires:  pam-devel
63 BuildRequires:  perl-base
64 BuildRequires:  rpmbuild(macros) >= 1.268
65 BuildRequires:  sed >= 4.0
66 BuildRequires:  unzip
67 Requires(post): /bin/hostname
68 Requires(post): fileutils
69 Requires(post): findutils
70 Requires(post): grep
71 Requires(post,preun):   /sbin/chkconfig
72 Requires(postun):       /usr/sbin/groupdel
73 Requires(postun):       /usr/sbin/userdel
74 Requires(pre,triggerpostun):    /bin/id
75 Requires(pre):  /usr/bin/getgid
76 Requires(pre):  /usr/lib/rpm/user_group.sh
77 Requires(pre):  /usr/sbin/groupadd
78 Requires(pre):  /usr/sbin/useradd
79 Requires(pre,triggerpostun):    /usr/sbin/usermod
80 Requires:       rc-scripts >= 0.2.0
81 Requires:       setup >= 2.4.6
82 Provides:       group(squid)
83 # epoll enabled by default:
84 Requires:       uname(release) >= 2.6
85 Provides:       user(squid)
86 Conflicts:      logrotate < 3.7-4
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %define         _webapps        /etc/webapps
90 %define         _webapp         cachemgr
91 %define         _libexecdir     %{_libdir}/%{name}
92 %define         _sysconfdir     /etc/%{name}
93 %define         _cgidir         %{_prefix}/lib/cgi-bin/%{_webapp}
94
95 %description
96 Squid is a high-performance proxy caching server for web clients,
97 supporting FTP, gopher, and HTTP data objects. Unlike traditional
98 caching software, Squid handles all requests in a single,
99 non-blocking, I/O-driven process. Squid keeps meta data and especially
100 hot objects cached in RAM, caches DNS lookups, supports non-blocking
101 DNS lookups, and implements negative caching of failed requests. If
102 you are tight on memory, check out the NOVM version of this package.
103 Squid supports SSL, extensive access controls, and full request
104 logging. By using the lightweight Internet Cache Protocol, Squid
105 caches can be arranged in a hierarchy or mesh for additional bandwidth
106 savings. Squid consists of a main server program squid, a Domain Name
107 System lookup program dnsserver, a program for retrieving FTP data
108 ftpget, and some management and client tools. When squid starts up, it
109 spawns a configurable number of dnsserver processes, each of which can
110 perform a single, blocking Domain Name System (DNS) lookup. This
111 reduces the amount of time the cache waits for DNS lookups. Squid is
112 derived from the ARPA-funded Harvest project.
113
114 %description -l es.UTF-8
115 Squid es un servidor proxy con caché de alto desempeño para clientes
116 web, soportando FTP, gopher y HTTP. Diferentemente de softwares
117 tradicionales de caché squid manipula todas las requisiciones en un
118 único proceso sin bloqueos, direccionado a E/S. Mantienen metadatos y
119 objetos frecuentemente pedidos en uno caché en memoria RAM. Hace caché
120 de resoluciones DNS, soporta resoluciones DNS sin bloqueo y implementa
121 un caché negativo de requisiciones que fallen. Si tiene poca memoria
122 da un vistazo en la versión NOVM de este paquete. También soporta SSL,
123 controles extensivos de acceso y registro (log) completo de las
124 requisiciones. Usando el ligero Protocolo de Caches Internet (ICP)
125 puede ser usado en una jerarquía de servidores para mayor ahorro de la
126 banda de comunicación. Está compuesto del programa squid (servidor
127 principal), del programa dnsserver (para resolución DNS), del programa
128 ftpget (para transmisiones ftp) y otras herramientas clientes y para
129 administración. Cuando squid se inicia, dispara un número configurable
130 de procesos dnsserver, cada uno pudiendo ejecutar solamente una
131 resolución DNS con poder de bloquear. Esto reduce el tiempo que el
132 caché espera por resoluciones DNS. Fue derivado del proyecto Harvest,
133 financiado por la ARPA.
134
135 %description -l pl.UTF-8
136 Squid jest wysoce wydajnym serwerem proxy-cache dla przeglądarek WWW,
137 klientów FTP i gopher. Squid przechowuje najczęściej pobierane dane w
138 pamięci RAM i zapamiętuje odwołania do DNS. Squid oferuje wsparcie dla
139 SSL, rozbudowaną kontrolę dostępu oraz pełne rejestrowanie pobieranych
140 danych. Dzięki użyciu protokołu ICP (Internet Cache Protocol), serwer
141 squid można łączyć w hierarchię, zwiększając ich efektywność. Pakiet
142 squid obejmuje: główny program serwera squid, program dostarczający
143 informacji z DNS dnsserver, program odbierający dane FTP ftpget, oraz
144 pomocnicze programy do zarządzania. Squid wywodzi się ze
145 sponsorowanego przez ARPA projektu Harvest.
146
147 %description -l pt_BR.UTF-8
148 O Squid é um servidor proxy com cache de alta performance para
149 clientes web, suportando FTP, gopher e HTTP. Diferentemente de
150 softwares tradicionais de cache o squid manipula todas as requisições
151 em um único processo sem bloqueios, direcionado a E/S.
152
153 Mantém meta dados e objetos freqüentemente pedidos num cache em
154 memória RAM. Faz cache de resoluções DNS, suporta resoluções DNS sem
155 bloqueio e implementa um cache negativo de requisições que falharem.
156 Se você tem pouca memória dê uma olhada na versão NOVM deste pacote.
157
158 Também suporta SSL, controles extensivos de acesso e registro (log)
159 completo das requisições. Usando o leve Protocolo de Caches Internet
160 (ICP) ele pode ser usado em uma hierarquia de servidores para maior
161 economia de banda de comunicação.
162
163 Ele consiste do programa squid (servidor principal), do programa
164 dnsserver (para resolução DNS), do programa ftpget (para transmissões
165 ftp) e outras ferramentas clientes e para gerenciamento. Quando o
166 squid é inicializado ele dispara um número configurável de processos
167 dnsserver, cada um podendo executar somente uma resolução DNS
168 bloqueante. Isto reduz o tempo que o cache espera por resoluções DNS.
169
170 Foi derivado do projeto Harvest, financiado pela ARPA.
171
172 %description -l ru.UTF-8
173 Squid - это высокопроизводительный кэширующий прокси-сервер для
174 клиентов web, поддерживающий объекты данных типа FTP, gopher и HTTP. В
175 отличие от традиционных кэширующих программ, Squid обрабатывает все
176 запросы при помощи одного неблокирующегося, управляемого
177 вводом-выводом процесса.
178
179 Этот пакет имеет встроенную поддержку базы данных сетевых ICMP-проб
180 (Netdb).
181
182 %description -l uk.UTF-8
183 Squid - це кешуючий проксі-сервер для web-клієнтів, що підтримує
184 об'єкти даних типу FTP, gopher та HTTP. На відміну від традиційних
185 кешуючих програм, Squid обробляє всі запити за допомогою одного
186 неблокуючого, керованого вводом-виводом процесу.
187
188 Цей пакет має вбудовану підтримку бази даних мережевих ICMP-проб
189 (Netdb).
190
191 %package cachemgr
192 Summary:        CGI script for Squid management
193 Summary(pl.UTF-8):      Skrypt CGI do zarządzania Squidem przez WWW
194 Group:          Applications/WWW
195 # does not require squid locally
196 Requires:       group(http)
197 Requires:       webapps
198 Requires:       webserver
199 Requires:       webserver(access)
200 Requires:       webserver(alias)
201 Requires:       webserver(cgi)
202
203 %description cachemgr
204 Cachemgr.cgi is a CGI script that allows administrator to check
205 various informations about Squid via WWW.
206
207 %description cachemgr -l pl.UTF-8
208 Cachemgr.cgi jest skryptem CGI, który pozwala administratorowi
209 zapoznać się z informacjami o pracy Squida poprzez WWW.
210
211 %package kerb_auth
212 Summary:        Authentication via the Negotiate RFC 4559 for proxies
213 Summary(pl.UTF-8):      Uwierzytelnianie przez negocjację RFC 4559 dla serwerów proxy
214 Group:          Networking/Admin
215
216 %description kerb_auth
217 This squid helper is a reference implementation that supports
218 authentication via the Negotiate RFC 4559 for proxies.
219 It decodes RFC 2478 SPNEGO GSS-API tokens from IE7 either through
220 helper functions or via SPNEGO supporting Kerberos libraries
221 and RFC 1964 Kerberos tokens from Firefox on Linux.
222
223 %description kerb_auth -l pl.UTF-8
224 Pakiet ten jest implementacją uwierzytelniania przez negocjacji RFC 4559
225 dla serwerów proxy. Dekoduje żetony SPNEGO GSS-API RFC 2478
226 z IE7 poprzez funkcje pomocnicze lub przez biblioteki Kerberos
227 wspierające SPNEGO i żetony Kerberos RFC 1964 z Firefoksa w Linuksie.
228
229 %package ldap_auth
230 Summary:        LDAP authentication helper for Squid
231 Summary(pl.UTF-8):      Obsługa uwierzytelniania LDAP dla squida
232 Group:          Networking/Admin
233
234 %description ldap_auth
235 This Squid helper allows authentication against LDAP directories using
236 the "simple authentication" (plain-text).
237
238 %description ldap_auth -l pl.UTF-8
239 Pakiet ten pozwala na uwierzytelnianie przez LDAP za pomocą prostego
240 uwierzytelniania (otwartym tekstem).
241
242 %package pam_auth
243 Summary:        PAM authentication helper for Squid
244 Summary(pl.UTF-8):      Obsługa uwierzytelniania PAM dla squida
245 Group:          Networking/Admin
246 Requires:       pam >= 0.77.3
247
248 %description pam_auth
249 This program authenticates users against a PAM configured
250 authentication service "squid". This allows you to authenticate Squid
251 users to any authentication source for which you have a PAM module.
252
253 %description pam_auth -l pl.UTF-8
254 Program ten pozwala na uwierzytelnianie użytkowników squida w dowolnym
255 źródle posiadającym moduł PAM.
256
257 %package smb_auth
258 Summary:        SMB authentication helper for Squid
259 Summary(pl.UTF-8):      Obsługa uwierzytelniania SMB dla squida
260 Group:          Networking/Admin
261
262 %description smb_auth
263 This is a proxy authentication module. With smb_auth you can
264 authenticate proxy users against an SMB server like Windows NT or
265 Samba.
266
267 %description smb_auth -l pl.UTF-8
268 To jest moduł uwierzytelniania proxy. Przy pomocy smb_auth można
269 uwierzytelniać użytkowników proxy na serwerach SMB, jak Windows NT czy
270 Samba.
271
272 %package msnt_auth
273 Summary:        MSNT domain authentication helper for Squid
274 Summary(pl.UTF-8):      Obsługa uwierzytelniania w domenie MSNT dla squida
275 Group:          Networking/Admin
276
277 %description msnt_auth
278 This is an authentication module for the Squid proxy server to
279 authenticate users on an NT domain.
280
281 %description msnt_auth -l pl.UTF-8
282 Jest to moduł uwierzytelniania proxy, który pozwala na
283 uwierzytelnianie użytkowników proxy w domenie NT.
284
285 %package yp_auth
286 Summary:        YP authentication helper for Squid
287 Summary(pl.UTF-8):      Obsługa uwierzytelniania YP dla squida
288 Group:          Networking/Admin
289
290 %description yp_auth
291 This is an authentication module for the Squid proxy server to
292 authenticate users on YP.
293
294 %description yp_auth -l pl.UTF-8
295 Jest to moduł uwierzytelniania proxy, który pozwala na
296 uwierzytelnianie użytkowników proxy poprzez YP.
297
298 %package ncsa_auth
299 Summary:        NCSA httpd style authentication helper for Squid
300 Summary(pl.UTF-8):      Obsługa uwierzytelniania NCSA httpd dla squida
301 Group:          Networking/Admin
302
303 %description ncsa_auth
304 This module uses a NCSA httpd style password file for authentication.
305
306 %description ncsa_auth -l pl.UTF-8
307 Moduł uwierzytelniania proxy używający pliku haseł jak w NCSA httpd.
308
309 %package sasl_auth
310 Summary:        SASL authentication helper for Squid
311 Summary(pl.UTF-8):      Obsługa uwierzytelniania SASL dla squida
312 Group:          Networking/Admin
313
314 %description sasl_auth
315 This is an authentication module for the Squid proxy server to
316 authenticate users via SASL.
317
318 %description sasl_auth -l pl.UTF-8
319 Jest to moduł uwierzytelniania proxy, który pozwala na
320 uwierzytelnianie użytkowników proxy poprzez SASL.
321
322 %package getpwname_auth
323 Summary:        getpwname authentication helper for Squid
324 Summary(pl.UTF-8):      Obsługa uwierzytelniania getpwname dla squida
325 Group:          Networking/Admin
326
327 %description getpwname_auth
328 This is an authentication module for the Squid proxy server to
329 authenticate users using getpwname.
330
331 %description getpwname_auth -l pl.UTF-8
332 Jest to moduł uwierzytelniania proxy, który pozwala na
333 uwierzytelnianie użytkowników proxy poprzez getpwname.
334
335 %package passwd_auth
336 Summary:        passwd authentication helper for Squid
337 Summary(pl.UTF-8):      Obsługa uwierzytelniania passwd dla squida
338 Group:          Networking/Admin
339
340 %description passwd_auth
341 This is an authentication module for the Squid proxy server to
342 authenticate users with separate passwd file.
343
344 %description passwd_auth -l pl.UTF-8
345 Jest to moduł uwierzytelniania proxy, który pozwala na
346 uwierzytelnianie użytkowników proxy poprzez oddzielny plik passwd.
347
348 %package ntlm_auth
349 Summary:        NTLM authentication helper for Squid
350 Summary(pl.UTF-8):      Obsługa uwierzytelniania NTLM dla squida
351 Group:          Networking/Admin
352
353 %description ntlm_auth
354 This is an authentication module for the Squid proxy server to
355 authenticate users on NTLM.
356
357 %description ntlm_auth -l pl.UTF-8
358 Jest to moduł uwierzytelniania proxy, który pozwala na
359 uwierzytelnianie użytkowników proxy poprzez NTLM.
360
361 %package radius_auth
362 Summary:        RADIUS authentication helper for Squid
363 Summary(pl.UTF-8):      Obsługa uwierzytelniania RADIUS dla squida
364 Group:          Networking/Admin
365
366 %description radius_auth
367 This  helper allows Squid to connect to a RADIUS server to validate
368 the user name and password of Basic HTTP authentication.
369
370 %description radius_auth -l pl.UTF-8
371 Program ten pozwala na uwierzytelnianie użytkowników squida przez
372 serwer RADIUS.
373
374 %package digest_ldap_auth
375 Summary:        LDAP authentication helper for Squid
376 Summary(pl.UTF-8):      Obsługa uwierzytelniania LDAP dla squida
377 Group:          Networking/Admin
378
379 %description digest_ldap_auth
380 This is an authentication module for the Squid proxy server to
381 authenticate users on LDAP.
382
383 %description digest_ldap_auth -l pl.UTF-8
384 Jest to moduł uwierzytelniania proxy, który pozwala na
385 uwierzytelnianie użytkowników proxy poprzez LDAP.
386
387 %package ip_acl
388 Summary:        IP external ACL helper for Squid
389 Summary(pl.UTF-8):      Wsparcie kontroli dostępu przez IP dla squida
390 Group:          Networking/Admin
391 Requires:       %{name} = %{epoch}:%{version}-%{release}
392
393 %description ip_acl
394 This is an external ACL module for the Squid proxy server to limit
395 access for users based on IP address.
396
397 %description ip_acl -l pl.UTF-8
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 adresu IP.
400
401 %package ldap_acl
402 Summary:        LDAP group external ACL helper for Squid
403 Summary(pl.UTF-8):      Wsparcie kontroli dostępu przez grupy LDAP dla squida
404 Group:          Networking/Admin
405 Requires:       %{name} = %{epoch}:%{version}-%{release}
406
407 %description ldap_acl
408 This is an external ACL module for the Squid proxy server to limit
409 access for users based on LDAP group membership.
410
411 %description ldap_acl -l pl.UTF-8
412 Jest to moduł kontroli dostępu (ACL) do proxy, który pozwala na
413 ograniczenie dostępu użytkowników proxy na podstawie ich
414 przynależności do grup LDAP.
415
416 %package unix_acl
417 Summary:        UNIX group external ACL helper for Squid
418 Summary(pl.UTF-8):      Wsparcie kontroli dostępu przez grupy UNIX dla squida
419 Group:          Networking/Admin
420 Requires:       %{name} = %{epoch}:%{version}-%{release}
421
422 %description unix_acl
423 This is an external ACL module for the Squid proxy server to limit
424 access for users based on UNIX group membership.
425
426 %description unix_acl -l pl.UTF-8
427 Jest to moduł kontroli dostępu (ACL) do proxy, który pozwala na
428 ograniczenie dostępu użytkowników proxy na podstawie ich
429 przynależności do grup UNIX.
430
431 %package wbinfo_acl
432 Summary:        NT domain group external ACL helper for Squid
433 Summary(pl.UTF-8):      Wsparcie kontroli dostępu przez grupy w domenie NT dla squida
434 Group:          Networking/Admin
435 Requires:       %{name} = %{epoch}:%{version}-%{release}
436
437 %description wbinfo_acl
438 This is an external ACL module for the Squid proxy server to limit
439 access for users based on NT domain group membership using wbinfo.
440
441 %description wbinfo_acl -l pl.UTF-8
442 Jest to moduł kontroli dostępu (ACL) do proxy, który pozwala na
443 ograniczenie dostępu użytkowników proxy na podstawie ich
444 przynależności do grup w domenie NT przy użyciu wbinfo.
445
446 %package session_acl
447 Summary:        Squid session tracking external ACL group helper
448 Summary(pl.UTF-8):      Wsparcie kontroli dostępu przez śledzenie sesji
449 Group:          Networking/Admin
450 Requires:       %{name} = %{epoch}:%{version}-%{release}
451
452 %description session_acl
453 This helper maintains a concept of sessions by monitoring requests and
454 timing out sessions if no requests have been seen for the idle timeout
455 timer.
456
457 %description session_acl -l pl.UTF-8
458 Moduł oparty na koncepcji sesji, śledzący zapytania i wygaszający sesje
459 jeśli w określonym czasie nie widziano w ich obrębie kolejnych zapytań.
460
461 %package scripts
462 Summary:        Perl scripts for Squid
463 Summary(pl.UTF-8):      Skrypty perlowe dla Squida
464 Group:          Networking/Admin
465 Requires:       %{name} = %{epoch}:%{version}-%{release}
466
467 %description scripts
468 This package contains Perl scripts and contributed programs for Squid.
469
470 %description scripts -l pl.UTF-8
471 Ten pakiet zawiera skrypty perlowe i dodatkowe programy dla Squida.
472
473 %prep
474 %setup -q -a1 -a4
475 # Bug fixes from Squid home page:
476
477 # Other patches:
478 %patch0 -p1
479 %patch1 -p1
480 %patch2 -p1
481 %patch3 -p1
482 %{?with_combined_log:%patch4 -p1}
483 %ifarch ppc
484 %patch5 -p1
485 %endif
486 %patch6 -p1
487
488 %{__sed} -i -e '1s#!.*bin/perl#!%{__perl}#' {contrib,scripts,helpers/*/*}/*.pl
489
490 %build
491 %{__libtoolize}
492 %{__aclocal}
493 %{__autoconf}
494 %{__autoheader}
495 %{__automake}
496 %configure \
497         --with-logdir=/var/log/squid \
498         --with-pidfile=/var/run/squid.pid \
499         --datadir=%{_datadir}/squid \
500         --enable-arp-acl \
501         --enable-auth="basic,digest,negotiate,ntlm" \
502         --enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,getpwnam,multi-domain-NTLM,squid_radius_auth" \
503         --enable-ntlm-auth-helpers="fakeauth,no_check,smb_lm" \
504         --enable-negotiate-auth-helpers="squid_kerb_auth" \
505         --enable-digest-auth-helpers="ldap,password" \
506         --enable-external-acl-helpers="ip_user,ldap_group,session,unix_group,wbinfo_group" \
507         --enable-ntlm-fail-open \
508         --enable-cache-digests \
509         --enable-coss-aio-ops \
510         --enable-delay-pools \
511         --enable-err-language=English \
512         --enable-esi \
513         --enable-follow-x-forwarded-for \
514         --enable-forward-log \
515         --enable-forw-via-db \
516         --enable-htcp \
517         --enable-icap-client \
518         --enable-icmp \
519         --enable-kill-parent-hack \
520         --enable-large-cache-files \
521         --enable-linux-netfilter \
522         --enable-linux-tproxy \
523         --enable-multicast-miss \
524         --enable-referer-log \
525         --enable-removal-policies="heap,lru" \
526         --enable-snmp \
527         --enable-ssl \
528         --enable-ipv6 \
529         --enable-storeio="aufs,diskd,ufs" \
530         --enable-useragent-log \
531         --enable-x-accelerator-vary \
532         --localstatedir=/var \
533         --sysconfdir=%{_sysconfdir} \
534         --with-auth-on-acceleration \
535         --with-large-files \
536         --with-maxfd=32768 \
537         --with-pthreads \
538         --enable-zph-qos
539
540 %{__make}
541
542 %install
543 rm -rf $RPM_BUILD_ROOT
544 install -d $RPM_BUILD_ROOT{%{_cgidir},%{_webapps}/%{_webapp}} \
545         $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
546         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
547         $RPM_BUILD_ROOT%{_mandir}/man8 \
548         $RPM_BUILD_ROOT%{_datadir}/squid \
549         $RPM_BUILD_ROOT/var/{cache,log{,/archive}}/squid
550
551 %{__make} install \
552         DESTDIR=$RPM_BUILD_ROOT
553
554 cp -a contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
555 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
556
557 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
558 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
559
560 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
561 cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
562 cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
563 rm $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/cachemgr.conf.default
564
565 cd $RPM_BUILD_ROOT/etc/squid
566 %{__patch} -p0 < %{SOURCE5}
567 rm *.default squid.conf.documented
568 cd -
569
570 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
571 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
572 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
573
574 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
575
576 rm $RPM_BUILD_ROOT%{_datadir}/squid/errors/{COPYRIGHT,TRANSLATORS}
577
578 # cp, to have re-entrant install
579 rm -rf docs
580 cp -a doc docs
581 # dunno why, but manual is not installed
582 mv docs/squid.8 $RPM_BUILD_ROOT%{_mandir}/man8
583 # We don't want Makefiles as docs...
584 rm docs/Makefile*
585
586 :> $RPM_BUILD_ROOT/var/cache/squid/netdb_state
587 :> $RPM_BUILD_ROOT/var/cache/squid/swap.state
588 :> $RPM_BUILD_ROOT/var/cache/squid/swap.state.clean
589 :> $RPM_BUILD_ROOT/var/cache/squid/swap.state.last-clean
590
591 %clean
592 rm -rf $RPM_BUILD_ROOT
593
594 %pre
595 %groupadd -g 91 squid
596 %useradd -o -u 91 -s /bin/false -g squid -c "SQUID http caching daemon" -d /var/cache/squid squid
597 %addusertogroup stats squid
598
599 [ -L %{_datadir}/squid/errors ] && rm -f %{_datadir}/squid/errors || :
600
601 %post
602 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
603         hostname=`/bin/hostname -f 2>/dev/null` || hostname='localhost'
604         echo visible_hostname $hostname >> /etc/squid/squid.conf
605 fi
606
607 /sbin/chkconfig --add squid
608 if [ "$1" = "1" ]; then
609         /sbin/service squid init >&2
610 fi
611 %service squid restart
612
613 %preun
614 if [ "$1" = "0" ]; then
615         /sbin/chkconfig --del squid
616         %service squid stop
617
618         # nuke squid cache if uninstalling
619         rm -rf /var/cache/squid/??
620 fi
621
622 %postun
623 if [ "$1" = "0" ]; then
624         %userremove squid
625         %groupremove squid
626 fi
627
628 %triggerpostun -- squid < 7:2.5.STABLE7-5
629 %addusertogroup stats squid
630
631 %triggerin cachemgr -- apache1 < 1.3.37-3, apache1-base
632 %webapp_register apache %{_webapp}
633
634 %triggerun cachemgr -- apache1 < 1.3.37-3, apache1-base
635 %webapp_unregister apache %{_webapp}
636
637 %triggerin cachemgr -- apache < 2.2.0, apache-base
638 %webapp_register httpd %{_webapp}
639
640 %triggerun cachemgr -- apache < 2.2.0, apache-base
641 %webapp_unregister httpd %{_webapp}
642
643 %triggerpostun -- cachemgr < 7:3.0.STABLE10-0.2
644 if [ -f %{_sysconfdir}/cachemgr.conf.rpmsave ]; then
645         cp -f %{_webapps}/%{_webapp}/cachemgr.conf{,.rpmsave}
646         mv -f %{_sysconfdir}/cachemgr.conf.rpmsave %{_webapps}/%{_webapp}/cachemgr.conf
647 fi
648
649 %files
650 %defattr(644,root,root,755)
651 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART
652 %doc RELEASENOTES.html SPONSORS docs/* src/mib.txt FAQ*.html book-full.html
653 %doc src/squid.conf.default src/squid.conf.documented src/mime.conf.default
654 %doc errors/TRANSLATORS
655 %attr(755,root,root) %{_bindir}/squidclient
656 %attr(755,root,root) %{_libexecdir}/diskd
657 # YES, it has to be suid root, it sends ICMP packets.
658 %attr(4754,root,squid) %{_libexecdir}/pinger
659 %attr(755,root,root) %{_libexecdir}/unlinkd
660 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
661 %attr(755,root,root) %{_sbindir}/*
662
663 %attr(754,root,root) /etc/rc.d/init.d/squid
664 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
665 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/squid
666
667 %dir %{_sysconfdir}
668 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
669 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
670 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/errorpage.css
671
672 %dir %{_datadir}/squid
673 %dir %{_datadir}/squid/errors
674 %{_datadir}/squid/icons
675 %{_datadir}/squid/mib.txt
676 %{_datadir}/squid/errors/templates
677 %lang(af) %{_datadir}/squid/errors/af
678 %lang(ar) %{_datadir}/squid/errors/ar
679 %lang(ar) %{_datadir}/squid/errors/ar-*
680 %lang(az) %{_datadir}/squid/errors/az
681 %lang(az) %{_datadir}/squid/errors/az-*
682 %lang(bg) %{_datadir}/squid/errors/bg
683 %lang(bg) %{_datadir}/squid/errors/bg-*
684 %lang(ca) %{_datadir}/squid/errors/ca
685 %lang(cs) %{_datadir}/squid/errors/cs
686 %lang(cs) %{_datadir}/squid/errors/cs-*
687 %lang(da) %{_datadir}/squid/errors/da
688 %lang(da) %{_datadir}/squid/errors/da-*
689 %lang(de) %{_datadir}/squid/errors/de
690 %lang(de) %{_datadir}/squid/errors/de-*
691 %lang(el) %{_datadir}/squid/errors/el
692 %lang(el) %{_datadir}/squid/errors/el-*
693 %{_datadir}/squid/errors/en
694 %{_datadir}/squid/errors/en-*
695 %lang(es) %{_datadir}/squid/errors/es
696 %lang(es) %{_datadir}/squid/errors/es-*
697 %lang(et) %{_datadir}/squid/errors/et
698 %lang(et) %{_datadir}/squid/errors/et-*
699 %lang(fa) %{_datadir}/squid/errors/fa
700 %lang(fa) %{_datadir}/squid/errors/fa-*
701 %lang(fi) %{_datadir}/squid/errors/fi
702 %lang(fi) %{_datadir}/squid/errors/fi-*
703 %lang(fr) %{_datadir}/squid/errors/fr
704 %lang(fr) %{_datadir}/squid/errors/fr-*
705 %lang(he) %{_datadir}/squid/errors/he
706 %lang(he) %{_datadir}/squid/errors/he-*
707 %lang(hu) %{_datadir}/squid/errors/hu
708 %lang(hu) %{_datadir}/squid/errors/hu-*
709 %lang(hy) %{_datadir}/squid/errors/hy
710 %lang(hy) %{_datadir}/squid/errors/hy-*
711 %lang(id) %{_datadir}/squid/errors/id
712 %lang(id) %{_datadir}/squid/errors/id-*
713 %lang(it) %{_datadir}/squid/errors/it
714 %lang(it) %{_datadir}/squid/errors/it-*
715 %lang(ja) %{_datadir}/squid/errors/ja
716 %lang(ja) %{_datadir}/squid/errors/ja-*
717 %lang(ko) %{_datadir}/squid/errors/ko
718 %lang(ko) %{_datadir}/squid/errors/ko-*
719 %lang(lt) %{_datadir}/squid/errors/lt
720 %lang(lt) %{_datadir}/squid/errors/lt-*
721 %lang(lv) %{_datadir}/squid/errors/lv
722 %lang(lv) %{_datadir}/squid/errors/lv-*
723 %lang(ms) %{_datadir}/squid/errors/ms
724 %lang(ms) %{_datadir}/squid/errors/ms-*
725 %lang(nl) %{_datadir}/squid/errors/nl
726 %lang(nl) %{_datadir}/squid/errors/nl-*
727 %lang(pl) %{_datadir}/squid/errors/pl
728 %lang(pl) %{_datadir}/squid/errors/pl-*
729 %lang(pt) %{_datadir}/squid/errors/pt
730 %lang(pt) %{_datadir}/squid/errors/pt-pt
731 %lang(pt_BR) %{_datadir}/squid/errors/pt-br
732 %lang(ro) %{_datadir}/squid/errors/ro
733 %lang(ro) %{_datadir}/squid/errors/ro-*
734 %lang(ru) %{_datadir}/squid/errors/ru
735 %lang(ru) %{_datadir}/squid/errors/ru-*
736 %lang(sk) %{_datadir}/squid/errors/sk
737 %lang(sk) %{_datadir}/squid/errors/sk-*
738 %lang(sr) %{_datadir}/squid/errors/sr
739 %lang(sr) %{_datadir}/squid/errors/sr-*
740 %lang(sv) %{_datadir}/squid/errors/sv
741 %lang(sv) %{_datadir}/squid/errors/sv-*
742 %lang(th) %{_datadir}/squid/errors/th
743 %lang(th) %{_datadir}/squid/errors/th-*
744 %lang(tr) %{_datadir}/squid/errors/tr
745 %lang(tr) %{_datadir}/squid/errors/tr-*
746 %lang(uk) %{_datadir}/squid/errors/uk
747 %lang(uk) %{_datadir}/squid/errors/uk-*
748 %lang(uz) %{_datadir}/squid/errors/uz
749 %lang(zh_CN) %{_datadir}/squid/errors/zh-cn
750 %lang(zh_CN) %{_datadir}/squid/errors/zh-sg
751 %lang(zh_CN) %{_datadir}/squid/errors/zh-tw
752 %lang(zh_TW) %{_datadir}/squid/errors/zh-hk
753 %lang(zh_TW) %{_datadir}/squid/errors/zh-mo
754
755 %dir %{_libexecdir}
756
757 %attr(770,root,squid) %dir /var/log/archive/squid
758 %attr(770,root,squid) %dir /var/log/squid
759 %attr(660,root,squid) %ghost /var/log/squid/*
760
761 %attr(770,root,squid) %dir /var/cache/squid
762 %ghost /var/cache/squid/netdb_state
763 %ghost /var/cache/squid/swap.state
764 %ghost /var/cache/squid/swap.state.clean
765 %ghost /var/cache/squid/swap.state.last-clean
766 %{_mandir}/man1/squidclient.1*
767 %{_mandir}/man8/squid.8*
768
769 %files cachemgr
770 %defattr(644,root,root,755)
771 %dir %attr(750,root,http) %{_webapps}/%{_webapp}
772 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
773 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
774 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/cachemgr.conf
775 %attr(755,root,root) %{_cgidir}/cachemgr.cgi
776 %{_mandir}/man8/cachemgr.cgi.8*
777
778 %files ldap_auth
779 %defattr(644,root,root,755)
780 %doc helpers/basic_auth/LDAP/README
781 %attr(755,root,root) %{_libexecdir}/squid_ldap_auth
782 %{_mandir}/man8/squid_ldap_auth.*
783
784 %files pam_auth
785 %defattr(644,root,root,755)
786 %doc helpers/basic_auth/PAM/pam_auth.c
787 %config(noreplace) /etc/pam.d/squid
788 %config(noreplace) /etc/security/blacklist.squid
789 %attr(755,root,root) %{_libexecdir}/pam_auth
790 %{_mandir}/man8/pam_auth.8*
791
792 %files smb_auth
793 %defattr(644,root,root,755)
794 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
795 %doc helpers/basic_auth/multi-domain-NTLM/*
796 %attr(755,root,root) %{_libexecdir}/smb_auth*
797
798 %files msnt_auth
799 %defattr(644,root,root,755)
800 %doc helpers/basic_auth/MSNT/README*
801 %attr(755,root,root) %{_libexecdir}/msnt_auth
802 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
803
804 %files yp_auth
805 %defattr(644,root,root,755)
806 %attr(755,root,root) %{_libexecdir}/yp_auth
807
808 %files ncsa_auth
809 %defattr(644,root,root,755)
810 %attr(755,root,root) %{_libexecdir}/ncsa_auth
811 %{_mandir}/man8/ncsa_auth.8*
812
813 %files sasl_auth
814 %defattr(644,root,root,755)
815 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
816 %attr(755,root,root) %{_libexecdir}/sasl_auth
817
818 %files getpwname_auth
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_libexecdir}/getpwname_auth
821
822 %files passwd_auth
823 %defattr(644,root,root,755)
824 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
825
826 %files kerb_auth
827 %defattr(644,root,root,755)
828 %doc helpers/negotiate_auth/squid_kerb_auth/README
829 %attr(755,root,root) %{_libexecdir}/negotiate_kerb_auth
830 %attr(755,root,root) %{_libexecdir}/negotiate_kerb_auth_test
831 %attr(755,root,root) %{_libexecdir}/squid_kerb_auth
832 %attr(755,root,root) %{_libexecdir}/squid_kerb_auth_test
833
834 %files ntlm_auth
835 %defattr(644,root,root,755)
836 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
837 %attr(755,root,root) %{_libexecdir}/ntlm_smb_lm_auth
838
839 %files radius_auth
840 %defattr(644,root,root,755)
841 %doc helpers/basic_auth/squid_radius_auth/README
842 %attr(755,root,root) %{_libexecdir}/squid_radius_auth
843 %{_mandir}/man8/squid_radius_auth.8*
844
845 %files digest_ldap_auth
846 %defattr(644,root,root,755)
847 %attr(755,root,root) %{_libexecdir}/digest_ldap_auth
848
849 %files ip_acl
850 %defattr(644,root,root,755)
851 %doc helpers/external_acl/ip_user/{README,example*}
852 %attr(755,root,root) %{_libexecdir}/ip_user_check
853
854 %files ldap_acl
855 %defattr(644,root,root,755)
856 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
857 %{_mandir}/man8/%{name}_ldap_group.*
858
859 %files unix_acl
860 %defattr(644,root,root,755)
861 %doc helpers/external_acl/unix_group/README
862 %attr(755,root,root) %{_libexecdir}/squid_unix_group
863 %{_mandir}/man8/%{name}_unix_group.*
864
865 %files wbinfo_acl
866 %defattr(644,root,root,755)
867 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
868
869 %files session_acl
870 %defattr(644,root,root,755)
871 %attr(755,root,root) %{_libexecdir}/squid_session
872 %{_mandir}/man8/%{name}_session.8*
873
874 %files scripts
875 %defattr(644,root,root,755)
876 %attr(755,root,root) %{_libexecdir}/*.pl
877 %attr(755,root,root) %{_libexecdir}/contrib
This page took 0.122189 seconds and 3 git commands to generate.