2 # - separate package with www-files
3 # - add cron-job file to update
4 %include /usr/lib/rpm/macros.perl
5 Summary: A redirect script for the Squid proxy to block ad banners
6 Summary(pl): Skrypt dla Squida przekierowuj±cy w celu blokowania bannerów reklamowych
11 Group: Applications/System
12 Source0: http://phroggy.com/files/unix/%{name}-%{version}.tar.gz
13 Patch0: %{name}-conf.patch
14 URL: http://phroggy.com/bannerfilter/
15 BuildRequires: rpm-perlprov >= 3.0.3-18
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _http_dir /home/services/httpd/html/bannerfilter
23 BannerFilter is a redirect script for the Squid proxy server, designed
24 to block advertising banners on the Web. Unlike most other solutions,
25 it also automatically closes popup windows.
28 BannerFilter to skrypt przekierowuj±cy dla serwera proxy Squid,
29 przeznaczony do blokowania bannerów reklamowych na WWW. W
30 przeciwieñstwie do innych rozwi±zañ, dodatkowo automatycznie zamyka
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sbindir},%{_http_dir}}
41 install bannerfilter.conf $RPM_BUILD_ROOT%{_sysconfdir}/squid
42 install redirector.pl $RPM_BUILD_ROOT%{_sbindir}/redirector
43 install update.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}-update
44 install www/* $RPM_BUILD_ROOT%{_http_dir}
45 install *.data $RPM_BUILD_ROOT%{_sysconfdir}/squid/%{name}
48 rm -rf $RPM_BUILD_ROOT
51 echo "Add to your squid config following line:"
52 echo "redirect_program %{_sbindir}/redirector"
55 %defattr(644,root,root,755)
56 %doc CHANGES README TODO
57 %attr(755,root,root) %{_sbindir}/redirector
58 %attr(755,root,root) %{_sbindir}/%{name}-update
59 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/*.conf
60 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/%{name}/*.data
61 %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name}