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