]> git.pld-linux.org Git - packages/dnsgraph.git/blame_incremental - dnsgraph.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/dnsgraph.git] / dnsgraph.spec
... / ...
CommitLineData
1Summary: Simple BIND statistics
2Summary(pl.UTF-8): Proste statystyki dla BINDa
3Name: dnsgraph
4Version: 0.9
5Release: 0.1
6License: GPL v2
7Group: Applications/Networking
8Source0: http://dl.sourceforge.net/dnsgraph/%{name}-%{version}.tar.gz
9# Source0-md5: 4847627fb3709bbe166d59e872225693
10Source1: %{name}.cron
11Source2: %{name}.conf
12URL: http://dnsgraph.sourceforge.net/
13BuildRequires: rpm-perlprov
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
22Dnsgraph is a very simple DNS statistics RRDtool frontend for Bind
23(named) that produces daily, weekly, monthly, and yearly graphs of
24success/failure, recursion/referral, nxrrset/nxdomain.
25
26%description -l pl.UTF-8
27dnsgraph to bardzo prosty frontend dla RRDtoola do statystyk DNS dla
28Binda (named) tworzący dzienne, tygodniowe, miesięczne i roczne
29wykresy powodzeń/niepowodzeń, rekurencji/odniesień, nxrrset/nxdomain.
30
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 ] && \
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
53fi
54
55%preun
56if [ "$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
64fi
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.0318 seconds and 5 git commands to generate.