]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - separate package with www-files | |
3 | Summary: A redirect script for the Squid proxy to block ad banners | |
4 | Summary(pl.UTF-8): Skrypt dla Squida przekierowujący w celu blokowania bannerów reklamowych | |
5 | Name: bannerfilter | |
6 | Version: 1.31 | |
7 | Release: 1 | |
8 | Epoch: 1 | |
9 | License: GPL v2 | |
10 | Group: Applications/System | |
11 | Source0: http://phroggy.com/files/unix/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 329a8a6e2b04b21a6f77a365e62e0881 | |
13 | Source1: %{name}.cron | |
14 | Patch0: %{name}-conf.patch | |
15 | URL: http://phroggy.com/bannerfilter/ | |
16 | BuildRequires: rpm-perlprov >= 3.0.3-18 | |
17 | Requires: squid | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _http_dir /home/services/httpd/html/bannerfilter | |
22 | ||
23 | %description | |
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. | |
27 | ||
28 | %description -l pl.UTF-8 | |
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 | |
32 | wyskakujące okienka. | |
33 | ||
34 | %prep | |
35 | %setup -q | |
36 | %patch0 -p1 | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sysconfdir}/cron.daily/,%{_sbindir},%{_http_dir}} | |
41 | ||
42 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/bannerfilter | |
43 | install bannerfilter.conf $RPM_BUILD_ROOT%{_sysconfdir}/squid | |
44 | install redirector.pl $RPM_BUILD_ROOT%{_sbindir}/redirector | |
45 | install update.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}-update | |
46 | install www/* $RPM_BUILD_ROOT%{_http_dir} | |
47 | install *.data $RPM_BUILD_ROOT%{_sysconfdir}/squid/%{name} | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %post | |
53 | echo "Add to your squid config following line:" | |
54 | echo "redirect_program %{_sbindir}/redirector" | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc CHANGES README TODO | |
59 | %attr(755,root,root) %{_sbindir}/redirector | |
60 | %attr(755,root,root) %{_sbindir}/%{name}-update | |
61 | %attr(740,root,root) /etc/cron.daily/bannerfilter | |
62 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/*.conf | |
63 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/%{name}/*.data | |
64 | %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name} | |
65 | %{_http_dir} |