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
10 Group: Applications/System
11 Source0: http://phroggy.com/files/unix/%{name}-%{version}.tar.gz
12 Patch0: %{name}-conf.patch
13 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.
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sbindir},%{_http_dir}}
35 install bannerfilter.conf $RPM_BUILD_ROOT%{_sysconfdir}/squid
36 install redirector.pl $RPM_BUILD_ROOT%{_sbindir}/redirector
37 install update.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}-update
38 install www/* $RPM_BUILD_ROOT%{_http_dir}
39 install *.data $RPM_BUILD_ROOT%{_sysconfdir}/squid/%{name}
42 rm -rf $RPM_BUILD_ROOT
45 echo "Add to your squid config following line:"
46 echo "redirect_program %{_sbindir}/redirector"
49 %defattr(644,root,root,755)
50 %doc CHANGES README TODO
51 %attr(755,root,root) %{_sbindir}/redirector
52 %attr(755,root,root) %{_sbindir}/%{name}-update
53 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/*.conf
54 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squid/%{name}/*.data
55 %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name}