]> git.pld-linux.org Git - SPECS.git/blob - dnsgraph.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / dnsgraph.spec
1 Summary:        Simple BIND statistics
2 Summary(pl.UTF-8):      Proste statystyki dla BINDa
3 Name:           dnsgraph
4 Version:        0.9
5 Release:        0.1
6 License:        GPL v2
7 Group:          Applications/Networking
8 Source0:        http://dl.sourceforge.net/dnsgraph/%{name}-%{version}.tar.gz
9 # Source0-md5:  4847627fb3709bbe166d59e872225693
10 Source1:        %{name}.cron
11 Source2:        %{name}.conf
12 URL:            http://dnsgraph.sourceforge.net/
13 BuildRequires:  rpm-perlprov
14 Requires(post,preun):   grep
15 Requires(preun):        fileutils
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _dnsgraphdir    %{_datadir}/%{name}
20
21 %description
22 Dnsgraph is a very simple DNS statistics RRDtool frontend for Bind
23 (named) that produces daily, weekly, monthly, and yearly graphs of
24 success/failure, recursion/referral, nxrrset/nxdomain.
25
26 %description -l pl.UTF-8
27 dnsgraph to bardzo prosty frontend dla RRDtoola do statystyk DNS dla
28 Binda (named) tworzący dzienne, tygodniowe, miesięczne i roczne
29 wykresy powodzeń/niepowodzeń, rekurencji/odniesień, nxrrset/nxdomain.
30
31 %prep
32 %setup -q
33
34 %install
35 rm -rf $RPM_BUILD_ROOT
36 install -d $RPM_BUILD_ROOT{/etc/{cron.d,httpd},%{_dnsgraphdir}/html/imgs}
37
38 install dnsanalise.pl dnsreport.pl $RPM_BUILD_ROOT%{_dnsgraphdir}
39
40 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
41 install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd
42
43 %clean
44 rm -rf $RPM_BUILD_ROOT
45
46 %post
47 if [ -f /etc/httpd/httpd.conf ] && \
48         ! grep -q "^Include.*/%{name}.conf" /etc/httpd/httpd.conf; then
49                 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
50         if [ -f /var/lock/subsys/httpd ]; then
51                 apachectl restart
52         fi
53 fi
54
55 %preun
56 if [ "$1" = "0" ]; then
57         umask 027
58         grep -E -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
59                 /etc/httpd/httpd.conf.tmp
60         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
61         if [ -f /var/lock/subsys/httpd ]; then
62                 apachectl restart
63         fi
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc README
69 /etc/cron.d/%{name}
70 %{_sysconfdir}/httpd/%{name}.conf
71 %dir %{_dnsgraphdir}
72 %{_dnsgraphdir}/html
73 %attr(755,root,root) %{_dnsgraphdir}/dns*.pl
This page took 0.162564 seconds and 3 git commands to generate.