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