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