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