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 # Source0-md5: 3de85fc0f8bafbe8c3c72f10bd61379f
14 Patch0: %{name}-conf.patch
15 URL: http://phroggy.com/bannerfilter/
16 BuildRequires: rpm-perlprov >= 3.0.3-18
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _http_dir /srv/httpd/html/bannerfilter
24 BannerFilter is a redirect script for the Squid proxy server, designed
25 to block advertising banners on the Web. Unlike most other solutions,
26 it also automatically closes popup windows.
29 BannerFilter to skrypt przekierowuj±cy dla serwera proxy Squid,
30 przeznaczony do blokowania bannerów reklamowych na WWW. W
31 przeciwieñstwie do innych rozwi±zañ, dodatkowo automatycznie zamyka
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sbindir},%{_http_dir}}
42 install bannerfilter.conf $RPM_BUILD_ROOT%{_sysconfdir}/squid
43 install redirector.pl $RPM_BUILD_ROOT%{_sbindir}/redirector
44 install update.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}-update
45 install www/* $RPM_BUILD_ROOT%{_http_dir}
46 install *.data $RPM_BUILD_ROOT%{_sysconfdir}/squid/%{name}
49 rm -rf $RPM_BUILD_ROOT
52 echo "Add to your squid config following line:"
53 echo "redirect_program %{_sbindir}/redirector"
56 %defattr(644,root,root,755)
57 %doc CHANGES README TODO
58 %attr(755,root,root) %{_sbindir}/redirector
59 %attr(755,root,root) %{_sbindir}/%{name}-update
60 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/*.conf
61 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/%{name}/*.data
62 %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name}