]>
Commit | Line | Data |
---|---|---|
ab9789ed PG |
1 | # TODO: |
2 | # - separate package with www-files | |
ab9789ed | 3 | Summary: A redirect script for the Squid proxy to block ad banners |
d4378c8d | 4 | Summary(pl.UTF-8): Skrypt dla Squida przekierowujący w celu blokowania bannerów reklamowych |
ab9789ed | 5 | Name: bannerfilter |
d83b46a7 | 6 | Version: 1.31 |
ab9789ed | 7 | Release: 1 |
bbb912f2 | 8 | Epoch: 1 |
ab9789ed PG |
9 | License: GPL v2 |
10 | Group: Applications/System | |
11 | Source0: http://phroggy.com/files/unix/%{name}-%{version}.tar.gz | |
d83b46a7 | 12 | # Source0-md5: 329a8a6e2b04b21a6f77a365e62e0881 |
bbb912f2 | 13 | Source1: %{name}.cron |
ab9789ed PG |
14 | Patch0: %{name}-conf.patch |
15 | URL: http://phroggy.com/bannerfilter/ | |
ab9789ed PG |
16 | BuildRequires: rpm-perlprov >= 3.0.3-18 |
17 | Requires: squid | |
988acadb | 18 | BuildArch: noarch |
ab9789ed PG |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
87604fc4 | 21 | %define _http_dir /home/services/httpd/html/bannerfilter |
ab9789ed PG |
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 | ||
89f6559a JR |
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. | |
988acadb | 33 | |
ab9789ed PG |
34 | %prep |
35 | %setup -q | |
36 | %patch0 -p1 | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
bbb912f2 | 40 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sysconfdir}/cron.daily/,%{_sbindir},%{_http_dir}} |
ab9789ed | 41 | |
bbb912f2 | 42 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/bannerfilter |
ab9789ed PG |
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 | |
bbb912f2 | 61 | %attr(740,root,root) /etc/cron.daily/bannerfilter |
0f8faf9c SP |
62 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/*.conf |
63 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/%{name}/*.data | |
ab9789ed | 64 | %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name} |
14566add | 65 | %{_http_dir} |