1 %include /usr/lib/rpm/macros.perl
2 Summary: Simple BIND statistics
3 Summary(pl.UTF-8): Proste statystyki dla BINDa
8 Group: Applications/Networking
9 Source0: http://dl.sourceforge.net/dnsgraph/%{name}-%{version}.tar.gz
10 # Source0-md5: 4847627fb3709bbe166d59e872225693
13 URL: http://dnsgraph.sourceforge.net/
14 BuildRequires: rpm-perlprov
15 Requires(post,preun): grep
16 Requires(preun): fileutils
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _dnsgraphdir %{_datadir}/%{name}
23 Dnsgraph is a very simple DNS statistics RRDtool frontend for Bind
24 (named) that produces daily, weekly, monthly, and yearly graphs of
25 success/failure, recursion/referral, nxrrset/nxdomain.
27 %description -l pl.UTF-8
28 dnsgraph to bardzo prosty frontend dla RRDtoola do statystyk DNS dla
29 Binda (named) tworzący dzienne, tygodniowe, miesięczne i roczne
30 wykresy powodzeń/niepowodzeń, rekurencji/odniesień, nxrrset/nxdomain.
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{/etc/{cron.d,httpd},%{_dnsgraphdir}/html/imgs}
39 install dnsanalise.pl dnsreport.pl $RPM_BUILD_ROOT%{_dnsgraphdir}
41 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
42 install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd
45 rm -rf $RPM_BUILD_ROOT
48 if [ -f /etc/httpd/httpd.conf ] && \
49 ! grep -q "^Include.*/%{name}.conf" /etc/httpd/httpd.conf; then
50 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
51 if [ -f /var/lock/subsys/httpd ]; then
57 if [ "$1" = "0" ]; then
59 grep -E -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
60 /etc/httpd/httpd.conf.tmp
61 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
62 if [ -f /var/lock/subsys/httpd ]; then
68 %defattr(644,root,root,755)
71 %{_sysconfdir}/httpd/%{name}.conf
74 %attr(755,root,root) %{_dnsgraphdir}/dns*.pl