]>
Commit | Line | Data |
---|---|---|
ab9789ed PG |
1 | # TODO: |
2 | # - separate package with www-files | |
ab9789ed PG |
3 | %include /usr/lib/rpm/macros.perl |
4 | Summary: A redirect script for the Squid proxy to block ad banners | |
89f6559a | 5 | Summary(pl.UTF-8): Skrypt dla Squida przekierowujący w celu blokowania bannerów reklamowych |
ab9789ed | 6 | Name: bannerfilter |
d83b46a7 | 7 | Version: 1.31 |
ab9789ed | 8 | Release: 1 |
bbb912f2 | 9 | Epoch: 1 |
ab9789ed PG |
10 | License: GPL v2 |
11 | Group: Applications/System | |
12 | Source0: http://phroggy.com/files/unix/%{name}-%{version}.tar.gz | |
d83b46a7 | 13 | # Source0-md5: 329a8a6e2b04b21a6f77a365e62e0881 |
bbb912f2 | 14 | Source1: %{name}.cron |
ab9789ed PG |
15 | Patch0: %{name}-conf.patch |
16 | URL: http://phroggy.com/bannerfilter/ | |
ab9789ed PG |
17 | BuildRequires: rpm-perlprov >= 3.0.3-18 |
18 | Requires: squid | |
988acadb | 19 | BuildArch: noarch |
ab9789ed PG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
87604fc4 | 22 | %define _http_dir /home/services/httpd/html/bannerfilter |
ab9789ed PG |
23 | |
24 | %description | |
25 | BannerFilter is a redirect script for the Squid proxy server, designed | |
26 | to block advertising banners on the Web. Unlike most other solutions, | |
27 | it also automatically closes popup windows. | |
28 | ||
89f6559a JR |
29 | %description -l pl.UTF-8 |
30 | BannerFilter to skrypt przekierowujący dla serwera proxy Squid, | |
31 | przeznaczony do blokowania bannerów reklamowych na WWW. W | |
32 | przeciwieństwie do innych rozwiązań, dodatkowo automatycznie zamyka | |
33 | wyskakujące okienka. | |
988acadb | 34 | |
ab9789ed PG |
35 | %prep |
36 | %setup -q | |
37 | %patch0 -p1 | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
bbb912f2 | 41 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/squid/%{name},%{_sysconfdir}/cron.daily/,%{_sbindir},%{_http_dir}} |
ab9789ed | 42 | |
bbb912f2 | 43 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/bannerfilter |
ab9789ed PG |
44 | install bannerfilter.conf $RPM_BUILD_ROOT%{_sysconfdir}/squid |
45 | install redirector.pl $RPM_BUILD_ROOT%{_sbindir}/redirector | |
46 | install update.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}-update | |
47 | install www/* $RPM_BUILD_ROOT%{_http_dir} | |
48 | install *.data $RPM_BUILD_ROOT%{_sysconfdir}/squid/%{name} | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %post | |
54 | echo "Add to your squid config following line:" | |
55 | echo "redirect_program %{_sbindir}/redirector" | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
59 | %doc CHANGES README TODO | |
60 | %attr(755,root,root) %{_sbindir}/redirector | |
61 | %attr(755,root,root) %{_sbindir}/%{name}-update | |
bbb912f2 | 62 | %attr(740,root,root) /etc/cron.daily/bannerfilter |
0f8faf9c SP |
63 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/*.conf |
64 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid/%{name}/*.data | |
ab9789ed | 65 | %attr(750,root,squid) %dir %{_sysconfdir}/squid/%{name} |
14566add | 66 | %{_http_dir} |