]> git.pld-linux.org Git - packages/bannerfilter.git/blob - bannerfilter.spec
de43555661f02f20dc8d38d8314ce653a2e108ab
[packages/bannerfilter.git] / bannerfilter.spec
1 # TODO:
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 Name:           bannerfilter
7 Version:        1.21
8 Release:        1
9 License:        GPL v2
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/
14 BuildArch:      noarch
15 BuildRequires:  rpm-perlprov >= 3.0.3-18
16 Requires:       squid
17 %requires_eq    perl
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _http_dir       /home/services/httpd/html/bannerfilter
21
22 %description
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.
26
27 %prep
28 %setup -q
29 %patch0 -p1
30
31 %install
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sbindir},%{_http_dir}}
34
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}
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %post
45 echo "Add to your squid config following line:"
46 echo "redirect_program %{_sbindir}/redirector"
47
48 %files
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}
56 %{_http_dir}/*
This page took 0.583954 seconds and 2 git commands to generate.