File dnstop.spec of Package dnstop
# norootforbuild
Name: dnstop
Version: 20140915
Release: 0
Summary: DNS Traffic Monitor
Source: http://dns.measurement-factory.com/tools/dnstop/src/dnstop-%{version}.tar.gz
Source1: usr.bin.dnstop
Patch1: dnstop-destdir.patch
URL: http://dns.measurement-factory.com/tools/dnstop/
Group: Productivity/Networking/DNS/Utilities
License: BSD-2-Clause
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: ncurses-devel
BuildRequires: libpcap-devel
BuildRequires: gcc make glibc-devel
BuildRequires: autoconf automake libtool
%description
dnstop is a libpcap application (ala tcpdump) that displays various tables of
DNS traffic on your network. Currently dnstop displays tables of:
* Source IP addresses
* Destination IP addresses
* Query types
* Response codes
* Opcodes
* Top level domains
* Second level domains
* Third level domains
* etc...
dnstop supports both IPv4 and IPv6 addresses.
To help find especially undesirable DNS queries, dnstop provides a number of
filters. The filters tell dnstop to display only the following types of
queries:
* For unknown/invalid TLDs
* A queries where the query name is already an IP address
* PTR queries for RFC1918 address space
dnstop can either read packets from the live capture device, or from a tcpdump
savefile.
Authors:
--------
Duane Wessels <wessels@measurement-factory.com>
Mark Foster <mark@foster.cc>
Jose Nazario <jose@monkey.org>
Sam Norris
Max Horn
John Morrissey <jwm@horde.net>
Florian Forster <octo@verplant.org>
Dave Plonka <plonka@cs.wisc.edu>
%prep
%setup -q
%patch1
%build
#export LIBS="-lncurses"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
export CFLAGS="%{optflags} -fPIE -pie"
export CXXFLAGS="%{optflags} -fPIE -pie"
%configure
%__make %{?_smp_mflags}
%install
make install DESTDIR="%{buildroot}"
install -D -m 0640 %{S:1} %{buildroot}/etc/apparmor.d/usr.bin.dnstop
%clean
%__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%doc CHANGES LICENSE
%{_bindir}/dnstop
%doc %{_mandir}/man8/dnstop.8*
%dir /etc/apparmor.d
%config(noreplace) /etc/apparmor.d/usr.bin.dnstop
%changelog
# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End: