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