]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
- update to Squid-2.4.STABLE6 (bug fix)
[packages/squid.git] / squid.spec
1 Summary:        SQUID Internet Object Cache
2 Summary(pl):    Uniwersalny proxy-cache server
3 Name:           squid
4 Version:        2.4.STABLE6
5 Release:        1
6 Epoch:          6
7 License:        GPL
8 Group:          Networking/Daemons
9 Source0:        http://www.squid-cache.org/Versions/v2/2.4/%{name}-%{version}-src.tar.gz
10 Source1:        %{name}-1.1.19-faq.tar.gz
11 Source2:        %{name}.init
12 Source3:        %{name}.sysconfig
13 Source4:        http://cache.is.co.za/%{name}-docs.tar.gz
14 Source5:        %{name}.conf.patch
15 Source6:        %{name}.logrotate
16 Patch10:        %{name}-perl.patch
17 Patch11:        %{name}-linux.patch
18 Patch12:        %{name}-fhs.patch
19 Patch13:        %{name}-location.patch
20 Patch14:        %{name}-domainmatch.patch
21 Patch15:        %{name}-libnsl_fixes.patch
22 BuildRequires:  autoconf
23 BuildRequires:  openldap-devel
24 BuildRequires:  pam-devel
25 PreReq:         rc-scripts >= 0.2.0
26 PreReq:         /sbin/chkconfig
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _libexecdir     %{_libdir}/%{name}
30 %define         _sysconfdir     /etc/%{name}
31
32 %description
33 Squid is a high-performance proxy caching server for web clients,
34 supporting FTP, gopher, and HTTP data objects. Unlike traditional
35 caching software, Squid handles all requests in a single,
36 non-blocking, I/O-driven process. Squid keeps meta data and especially
37 hot objects cached in RAM, caches DNS lookups, supports non-blocking
38 DNS lookups, and implements negative caching of failed requests. If
39 you are tight on memory, check out the NOVM version of this package.
40 Squid supports SSL, extensive access controls, and full request
41 logging. By using the lightweight Internet Cache Protocol, Squid
42 caches can be arranged in a hierarchy or mesh for additional bandwidth
43 savings. Squid consists of a main server program squid, a Domain Name
44 System lookup program dnsserver, a program for retrieving FTP data
45 ftpget, and some management and client tools. When squid starts up, it
46 spawns a configurable number of dnsserver processes, each of which can
47 perform a single, blocking Domain Name System (DNS) lookup. This
48 reduces the amount of time the cache waits for DNS lookups. Squid is
49 derived from the ARPA-funded Harvest project.
50
51 %description -l pl
52 Squid jest wysoce wydajnym serwerem proxy-cache dla przegl±darek WWW,
53 klientów FTP i gopher. Squid przechowuje najczê¶ciej pobierane dane w
54 pamiêci RAM i zapamiêtuje odwo³ania do DNS. Squid oferuje wsparcie dla
55 SSL, rozbudowan± kontrolê dostêpu oraz pe³ne rejestrowanie pobieranych
56 danych. Dziêki u¿yciu protoko³u ICP (Internet Cache Protocol), serwer
57 squid mo¿na ³±czyæ w hierarchiê, zwiêkszaj±c ich efektywno¶æ. Pakiet
58 squid obejmuje: g³ówny program serwera squid, program dostarczaj±cy
59 informacji z DNS dnsserver, program odbieraj±cy dane FTP ftpget, oraz
60 pomocnicze programy do zarz±dzania. Squid wywodzi siê ze
61 sponsorowanego przez ARPA projektu Harvest.
62
63 %package cachemgr
64 Summary:        CGI script for Squid management
65 Summary(pl):    Skrypt CGI do zarz±dzania Squidem przez WWW
66 Group:          Networking/Admin
67 Requires:       %{name} = %{version}
68 Requires:       httpd
69
70 %description cachemgr
71 Cachemgr.cgi is a CGI script that allows administrator to chceck
72 various informations about Squid via WWW.
73
74 %description cachemgr -l pl
75 Cachemgr.cgi jest skryptem CGI, który pozwala administratorowi
76 zapoznaæ siê z informacjami o pracy Squida poprzez WWW.
77
78 %package ldap_auth
79 Summary:        LDAP authentication helper for Squid
80 Summary(pl):    Wsparcie autentykacji LDAP dla squida
81 Group:          Networking/Admin
82 Requires:       %{name}
83
84 %description ldap_auth
85 This Squid helper allows authentication against LDAP directories using
86 the "simple authentication" (plain-text).
87
88 %description ldap_auth -l pl
89 Pakiet ten pozwala na autentykacjê LDAP za pomoc± prostej autentykacji
90 (otwartym tekstem).
91
92 %package pam_auth
93 Summary:        PAM authentication helper for Squid
94 Summary(pl):    Wsparcie autentykacji PAM dla squida
95 Group:          Networking/Admin
96 Requires:       %{name}
97
98 %description pam_auth
99 This program authenticates users against a PAM configured
100 authentication service "squid". This allows you to authenticate Squid
101 users to any authentication source for which you have a PAM module.
102
103 %description pam_auth -l pl
104 Program ten pozwala na autentykacjê u¿ytkowników squida w dowolnym
105 ¼ródle posiadaj±cym modu³ PAM.
106
107 %package smb_auth
108 Summary:        SMB authentication helper for Squid
109 Summary(pl):    Wsparcie autentykacji SMB dla squida
110 Group:          Networking/Admin
111 Requires:       %{name}
112
113 %description smb_auth
114 This is a proxy authentication module. With smb_auth you can
115 authenticate proxy users against an SMB server like Windows NT or
116 Samba.
117
118 %description smb_auth -l pl
119 To jest modu³ autentykacji proxy. Z smb_auth mo¿esz autentyfikowaæ
120 u¿ytkowników proxy na serwerach SMB, jak Windows NT czy Samba.
121
122 %prep
123 %setup -q -a 1 -a 4
124
125 # Bug fixes from Squid home page.
126
127 # Other patches:
128 %patch10 -p1
129 %patch11 -p1
130 %patch12 -p1
131 %patch13 -p1
132 %patch14 -p1
133 %patch15 -p1
134
135 %build
136 autoconf
137 %configure \
138         --localstatedir=/var \
139         --enable-icmp \
140         --enable-useragent-log \
141         --enable-snmp \
142         --enable-arp-acl \
143         --enable-err-language=English \
144         --enable-htcp \
145         --enable-carp \
146         --enable-storeio="aufs,coss,diskd,null,ufs" \
147         --enable-removal-policies="lru heap" \
148         --disable-ipf-transparent \
149         --enable-delay-pools \
150         --with-pthreads \
151         --enable-cache-digests \
152         --with-auth-modules=yes
153 # old dns-checker:
154 #       --disable-internal-dns \
155 # for 2.4 kernel:
156 #       --enable-linux-netfilter\
157
158 mv -f squid/* doc
159 %{__make}
160
161 %{__make} -C auth_modules SUBDIRS="LDAP MSNT NCSA PAM SMB YP getpwnam"
162
163 %install
164 rm -rf $RPM_BUILD_ROOT
165 install -d \
166         $RPM_BUILD_ROOT/home/httpd/cgi-bin \
167         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d} \
168         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/{contrib,auth_modules}} \
169         $RPM_BUILD_ROOT%{_mandir}/{man1,man8} \
170         $RPM_BUILD_ROOT%{_datadir}/squid \
171         $RPM_BUILD_ROOT/var/{cache,log{,/archiv}}/squid
172
173 %{__make} install \
174         prefix=$RPM_BUILD_ROOT%{_prefix} \
175         sysconfdir=$RPM_BUILD_ROOT/etc/squid \
176         bindir=$RPM_BUILD_ROOT%{_bindir} \
177         libdir=$RPM_BUILD_ROOT%{_libdir} \
178         libexecdir=$RPM_BUILD_ROOT%{_bindir} \
179         localstatedir=$RPM_BUILD_ROOT/var \
180         datadir=$RPM_BUILD_ROOT%{_datadir}
181
182 # We don't use %{__make} install-pinger, because it tries to set it suid root.
183 install src/pinger $RPM_BUILD_ROOT%{_bindir}
184
185 mv -f contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
186
187 # auth modules
188 install auth_modules/LDAP/squid_ldap_auth $RPM_BUILD_ROOT%{_libexecdir}/auth_modules
189 install -d $RPM_BUILD_ROOT%{_mandir}/man8
190 install auth_modules/LDAP/squid_ldap_auth.8 $RPM_BUILD_ROOT%{_mandir}/man8
191 gzip -9nf auth_modules/LDAP/README
192
193 install auth_modules/PAM/pam_auth $RPM_BUILD_ROOT%{_libexecdir}/auth_modules
194 gzip -9nf auth_modules/PAM/pam_auth.c # there is documentation
195
196
197 install auth_modules/SMB/smb_auth $RPM_BUILD_ROOT%{_libexecdir}/auth_modules
198 gzip -9nf auth_modules/SMB/README
199
200 mv -f $RPM_BUILD_ROOT%{_bindir}/cachemgr.cgi $RPM_BUILD_ROOT/home/httpd/cgi-bin
201 mv -f $RPM_BUILD_ROOT%{_bindir}/squid   $RPM_BUILD_ROOT%{_sbindir}/
202 mv -f $RPM_BUILD_ROOT/etc/squid/icons   $RPM_BUILD_ROOT%{_datadir}/squid
203
204 cd errors
205 for LNG in *; do
206         if [ -d $LNG ]; then
207                 mv -f $LNG $RPM_BUILD_ROOT%{_datadir}/squid/errors.$LNG
208         fi
209 done
210 cd ..
211
212 cd $RPM_BUILD_ROOT/etc/squid
213 cp -f squid.conf{,.default}
214 patch -p0 < %{SOURCE5}
215 cd -
216
217 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
218 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
219 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
220
221 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
222
223 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
224
225 # These two files start squid. They are replaced by /etc/rc.d/init.d script.
226 rm -f $RPM_BUILD_ROOT%{_bindir}/R*
227
228 gzip -9nf CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART \
229         TODO
230
231 %clean
232 #rm -rf $RPM_BUILD_ROOT
233
234 %pre
235 grep -q squid /etc/group || (
236         /usr/sbin/groupadd -g 91 -r -f squid 1>&2 || :
237 )
238 grep -q squid /etc/passwd || (
239         /usr/sbin/useradd -M -o -r -u 91 -s /bin/false \
240                 -g squid -c "SQUID http caching daemon" -d /var/cache/squid squid 1>&2 || :
241 )
242
243 %post
244 # If there is already link, don't do anything.
245 if [ ! -e %{_datadir}/squid/errors ]; then
246
247 # Try to create link to Polish, and then any directory but English.
248 if [ -d %{_datadir}/squid/errors.Polish ]; then
249         ln -sf %{_datadir}/squid/errors{.Polish,}
250         exit
251 else
252         find %{_datadir}/squid/errors/ -type d -name 'errors.*'| while read NAME; do
253                 if [ $NAME != "English" ]; then
254                         ln -fs $NAME %{_datadir}/squid/errors
255                         exit
256                 fi
257         done
258 fi
259
260 # Create symlink to English if everything else fails.
261 ln -sf %{_datadir}/squid/errors{.English,}
262
263 fi
264
265 if [ "$1" = "1" ]; then
266         /sbin/chkconfig --add squid
267         echo "Run \"/etc/rc.d/init.d/squid start\" to start squid." >&2
268 else
269         if [ -f /var/lock/subsys/squid ]; then
270                 /etc/rc.d/init.d/squid restart >&2
271         fi
272 fi
273
274 %preun
275 if [ "$1" = "0" ]; then
276         if [ -f /var/lock/subsys/squid ]; then
277                 /etc/rc.d/init.d/squid stop >&2
278         fi
279         /sbin/chkconfig --del squid
280         rm -f %{_datadir}/squid/errors
281 fi
282
283 %files
284 %defattr(644,root,root,755)
285 %doc faq *.gz doc/*
286
287 %attr(755,root,root) %{_bindir}/client
288 %attr(755,root,root) %{_bindir}/diskd
289 # It's obsolete while internal-dns is enabled
290 #%attr(755,root,root) %{_bindir}/dnsserver
291 # YES, it has to be suid root, it sends ICMP packets.
292 %attr(4754,root,squid) %{_bindir}/pinger
293 %attr(755,root,root) %{_bindir}/unlinkd
294 %attr(755,root,root) %{_sbindir}/*
295
296 %attr(755,root,root) %dir %{_sysconfdir}
297
298 %attr(754,root,root) /etc/rc.d/init.d/squid
299 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/squid
300 %attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
301 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
302 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
303 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
304 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
305
306 %{_datadir}/squid/icons
307 %{_datadir}/squid/mib.txt
308 %lang(bg) %{_datadir}/squid/errors.Bulgarian
309 %lang(cs) %{_datadir}/squid/errors.Czech
310 %lang(da) %{_datadir}/squid/errors.Danish
311 %lang(nl) %{_datadir}/squid/errors.Dutch
312 %{_datadir}/squid/errors.English
313 %lang(et) %{_datadir}/squid/errors.Estonian
314 %lang(fi) %{_datadir}/squid/errors.Finnish
315 %lang(fr) %{_datadir}/squid/errors.French
316 %lang(de) %{_datadir}/squid/errors.German
317 %lang(hu) %{_datadir}/squid/errors.Hungarian
318 %lang(it) %{_datadir}/squid/errors.Italian
319 %lang(ja) %{_datadir}/squid/errors.Japanese
320 %lang(ko) %{_datadir}/squid/errors.Korean
321 %lang(pl) %{_datadir}/squid/errors.Polish
322 %lang(pt) %{_datadir}/squid/errors.Portuguese
323 %lang(ro) %{_datadir}/squid/errors.Romanian
324 %lang(ru) %{_datadir}/squid/errors.Russian-1251
325 %lang(ru) %{_datadir}/squid/errors.Russian-koi8-r
326 %lang(zh) %{_datadir}/squid/errors.Simplify_Chinese
327 %lang(sk) %{_datadir}/squid/errors.Slovak
328 %lang(es) %{_datadir}/squid/errors.Spanish
329 %lang(sv) %{_datadir}/squid/errors.Swedish
330 %lang(zh) %{_datadir}/squid/errors.Traditional_Chinese
331 %lang(tr) %{_datadir}/squid/errors.Turkish
332
333 %attr(750,root,root) %dir %{_libexecdir}
334 %attr(750,root,root) %{_libexecdir}/*.pl
335 %attr(750,root,root) %{_libexecdir}/contrib
336 %attr(750,root,root) %dir %{_libexecdir}/auth_modules
337
338 %attr(770,root,squid) %dir /var/log/archiv/squid
339 %attr(770,root,squid) %dir /var/log/squid
340 %attr(660,root,squid) %ghost /var/log/squid/*
341
342 %attr(770,root,squid) %dir /var/cache/squid
343
344 %files cachemgr
345 %defattr(644,root,root,755)
346 %attr(755,root,root) /home/httpd/cgi-bin/*
347
348 %files ldap_auth
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libexecdir}/auth_modules/%{name}_ldap_auth
351 %attr(644,root,root) %{_mandir}/man8/%{name}_ldap_auth.*
352 %doc auth_modules/LDAP/*.gz
353
354 %files pam_auth
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_libexecdir}/auth_modules/pam_auth
357 %doc auth_modules/PAM/*.gz
358
359 %files smb_auth
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libexecdir}/auth_modules/smb_auth
362 %doc auth_modules/SMB/*.gz
This page took 0.125332 seconds and 4 git commands to generate.