Skip to content

Commit

Permalink
RPM spec and various automake fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jelu committed Dec 15, 2016
1 parent b734d8a commit d5463b4
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
@@ -1,9 +1,9 @@
ACLOCAL_AMFLAGS = -I m4 -I src/pcap-thread/m4

MAINTAINERCLEANFILES = $(srcdir)/Makefile.in \
$(srcdir)/src/config.h.in~ \
$(srcdir)/configure

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src plugins

dist_doc_DATA = README.md LICENSE CONTRIBUTORS
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
@@ -1,3 +1,3 @@
#!/bin/sh -e

autoreconf --force --install --no-recursive --include=src/pcap-thread/m4
autoreconf --force --install --no-recursive --include=m4 --include=src/pcap-thread/m4
22 changes: 11 additions & 11 deletions configure.ac
Expand Up @@ -43,7 +43,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AM_PROG_CC_C_O
AC_CANONICAL_HOST
AM_PROG_AR
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([disable-static])

# pcap_thread
Expand Down Expand Up @@ -91,33 +91,33 @@ AC_CHECK_FUNCS([snprintf])
AC_CHECK_FUNCS([setreuid setresuid setregid setresgid setegid seteuid])
AC_CHECK_FUNC([ns_initparse],
[AC_DEFINE([HAVE_NS_INITPARSE], [1], [Define to 1 if you have the `ns_initparse' function.])],
AC_CHECK_FUNC(__ns_initparse,
[AC_CHECK_FUNC(__ns_initparse,
[AC_DEFINE([HAVE_NS_INITPARSE], [1], [Define to 1 if you have the `ns_initparse' function.])]
)
)]
)
AC_CHECK_FUNC([ns_parserr],
[AC_DEFINE([HAVE_NS_PARSERR], [1], [Define to 1 if you have the `ns_parserr' function.])],
AC_CHECK_FUNC(__ns_parserr,
[AC_CHECK_FUNC(__ns_parserr,
[AC_DEFINE([HAVE_NS_PARSERR], [1], [Define to 1 if you have the `ns_parserr' function.])]
)
)]
)
AC_CHECK_FUNC([ns_sprintrr],
[AC_DEFINE([HAVE_NS_SPRINTRR], [1], [Define to 1 if you have the `ns_sprintrr' function.])],
AC_CHECK_FUNC(__ns_sprintrr,
[AC_CHECK_FUNC(__ns_sprintrr,
[AC_DEFINE([HAVE_NS_SPRINTRR], [1], [Define to 1 if you have the `ns_sprintrr' function.])]
)
)]
)
AC_CHECK_FUNC([ns_name_uncompress],
[AC_DEFINE([HAVE_NS_NAME_UNCOMPRESS], [1], [Define to 1 if you have the `ns_name_uncompress' function.])],
AC_CHECK_FUNC(__ns_name_uncompress,
[AC_CHECK_FUNC(__ns_name_uncompress,
[AC_DEFINE([HAVE_NS_NAME_UNCOMPRESS], [1], [Define to 1 if you have the `ns_name_uncompress' function.])]
)
)]
)
AC_CHECK_FUNC([p_rcode],
[AC_DEFINE([HAVE_P_RCODE], [1], [Define to 1 if you have the `p_rcode' function.])],
AC_CHECK_FUNC(__p_rcode,
[AC_CHECK_FUNC(__p_rcode,
[AC_DEFINE([HAVE_P_RCODE], [1], [Define to 1 if you have the `p_rcode' function.])]
)
)]
)
AC_CHECK_FUNCS([__assertion_failed])

Expand Down
55 changes: 55 additions & 0 deletions rpm/spec
@@ -0,0 +1,55 @@
Name: dnscap
Version: 1.2.0
Release: 1%{?dist}
Summary: Network capture utility designed specifically for DNS traffic

License: BSD-3-Clause
URL: https://www.dns-oarc.net/tools/dnscap
# Using same naming as to build debs, get the source (and rename it) at
# https://www.dns-oarc.net/tools/dnscap and change %setup
Source0: %{name}_%{version}.orig.tar.gz

BuildRequires: libpcap-devel
BuildRequires: ldns-devel
BuildRequires: openssl-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool

%description
dnscap is a network capture utility designed specifically for DNS
traffic. It produces binary data in pcap(3) format. This utility
is similar to tcpdump(1), but has a number of features tailored
to DNS transactions and protocol options.


%prep
%setup -q -n %{name}_%{version}


%build
sh autogen.sh
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/doc/*
%{_mandir}/man1/*
%{_libdir}/*


%changelog
* Thu Dec 15 2016 Jerry Lundström <lundstrom.jerry@gmail.com> 1.2.0-1
- Initial package

0 comments on commit d5463b4

Please sign in to comment.