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