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