SPECS: nast.spec
grzesiek Pycia
gzohop at gmail.com
Fri Mar 7 15:09:13 CET 2008
W załączniku spec i patche potrzebne do zbudowania nast na PLD.
Spec wrzuciłem już dawno na listę, poprawiłem zgłoszone błędy, ale wątek
coś umarł i nie wiem czy coś jest jeszcze nie tak, czy tylko nie znalazł
się nikt chętny żeby wrzucić do cvs ;)
Pozdrawiam
gzehop
-------------- next part --------------
# $Revision:$, $Date:$
Summary: Nast is a packet sniffer and a LAN analyzer based on Libnet and Libpcap
Summary(pl.UTF-8): Nast to sniffer i analizator pakietĂłw oparty na bibliotekach Libnet i Libpcap
Name: nast
Version: 0.2.0
Release: 1
License: GPL
Group: Applications/Networking
Source0: http://download.berlios.de/nast/%{name}-%{version}.tar.gz
# Source0-md5: 77cbab45f5850d6cdb7ecb10e291bfa7
Patch0: %{name}-ncurses_fix.patch
Patch1: %{name}-non_static.patch
Patch2: %{name}-autoheaders.patch
URL: http://nast.berlios.de/index.html
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libnet-devel
BuildRequires: libpcap-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: ncurses-ext-devel
BuildRequires: pkgconfig
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Nast can sniff in normal mode or in promiscuous mode the packets on a
network interface and log it. Nast dumps the headers of packets and
the payload in ascii or ascii-hex format. You can apply a filter. The
sniffed data can be saved in a separated file.
%description -l pl.UTF-8
Nast moĹźe snifowaÄ i logowaÄ pakiety na danym interfejsie w trybie
normalnym i nasĹuchiwania. Nast zrzuca nagĹĂłwki i dane z pakietĂłw
do formatu ascii lub ascii-hex. MoĹźliwe jest stosowanie filtrĂłw oraz
zapisywanie danych do osobnego pliku.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%{__libtoolize}
%{__aclocal}
%{__autoheader}
%{__autoconf}
%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8}
install nast $RPM_BUILD_ROOT%{_bindir}/nast
install nast.8 $RPM_BUILD_ROOT%{_mandir}/man8/nast.8
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog README TODO
%attr(755,root,root) %{_bindir}/nast
%{_mandir}/man8/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log:$
-------------- next part --------------
diff -urN nast-0.2.0/configure.ac nast-0.2.0./configure.ac
--- nast-0.2.0/configure.ac 2004-01-20 19:55:00.000000000 +0100
+++ nast-0.2.0./configure.ac 2007-07-08 18:59:27.000000000 +0200
@@ -158,7 +158,7 @@
fi
ENABLE_NCRS="no"
-AC_CHECK_LIB(ncurses, initscr, ENABLE_NCRS="yes"; NCURSES=ncurses/n_nast.o; LIBS="-lncurses $LIBS"; AC_DEFINE(HAVE_LIBNCURSES), AC_MSG_RESULT([
+AC_CHECK_LIB(ncurses, initscr, ENABLE_NCRS="yes"; NCURSES=ncurses/n_nast.o; LIBS="-lncurses $LIBS"; AC_DEFINE(HAVE_LIBNCURSES, 1,[libncurses]), AC_MSG_RESULT([
Ncurses library (*) not found in your system.
You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
@@ -196,7 +196,7 @@
fi
ENABLE_NCRS="no"
-AC_CHECK_LIB(menu, menu_opts_off, ENABLE_NCRS="yes"; MENU=ncurses/n_menu.o; LIBS="-lmenu $LIBS"; AC_DEFINE(HAVE_LIBMENU), AC_MSG_RESULT([
+AC_CHECK_LIB(menu, menu_opts_off, ENABLE_NCRS="yes"; MENU=ncurses/n_menu.o; LIBS="-lmenu $LIBS"; AC_DEFINE(HAVE_LIBMENU, 1, [libmenu]), AC_MSG_RESULT([
Menu library (*) not found in your system.
You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
-------------- next part --------------
diff -urN nast-0.2.0./common.c nast-0.2.0/common.c
--- nast-0.2.0./common.c 2004-02-15 20:51:07.000000000 +0100
+++ nast-0.2.0/common.c 2007-03-26 06:16:02.000000000 +0200
@@ -229,7 +229,7 @@
void sigexit()
{
#ifdef HAVE_LIBNCURSES
-# include <ncurses.h>
+# include <ncurses/ncurses.h>
if(graph)
{
endwin();
diff -urN nast-0.2.0./include/nast.h nast-0.2.0/include/nast.h
--- nast-0.2.0./include/nast.h 2004-02-15 20:51:07.000000000 +0100
+++ nast-0.2.0/include/nast.h 2007-03-26 06:13:19.000000000 +0200
@@ -26,7 +26,7 @@
#include "../config.h"
#ifdef HAVE_LIBNCURSES
-#include <ncurses.h>
+#include <ncurses/ncurses.h>
#endif
#include "ARPhdr.h"
diff -urN nast-0.2.0./ncurses/n_nast.h nast-0.2.0/ncurses/n_nast.h
--- nast-0.2.0./ncurses/n_nast.h 2004-01-20 19:56:20.000000000 +0100
+++ nast-0.2.0/ncurses/n_nast.h 2007-03-26 06:18:49.000000000 +0200
@@ -21,7 +21,7 @@
#ifdef HAVE_LIBNCURSES /*don't compile if we haven't ncurses*/
-# include <menu.h>
+# include <ncurses/menu.h>
# define SAFE_WREFRESH(x) do { wrefresh(x); } while(0)
-------------- next part --------------
diff -urN nast-0.2.0./configure.ac nast-0.2.0/configure.ac
--- nast-0.2.0./configure.ac 2004-01-20 19:55:00.000000000 +0100
+++ nast-0.2.0/configure.ac 2007-03-31 11:55:26.000000000 +0200
@@ -84,14 +84,14 @@
#
filechk="yes"
-AC_CHECK_FILE(/usr/lib/libnet.a,, filechk="no")
+AC_CHECK_FILE(/usr/include/libnet.h,, filechk="no")
if test "$filechk" = "no"; then
- AC_CHECK_FILE(/usr/local/lib/libnet.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ AC_CHECK_FILE(/usr/local/include/libnet.h, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
fi
if test "$filechk" = "no"; then AC_MSG_ERROR([
-Libnet archive file (libnet.a) not found in /usr or /usr/local!
+Libnet headers file (libnet.h) not found in /usr or /usr/local!
Libnet-1.1.x Packet Shaping Library is required.
You can download it from official web site: http://www.packetfactory.net/libnet
@@ -111,14 +111,14 @@
#
filechk="yes"
-AC_CHECK_FILE(/usr/lib/libpcap.a,, filechk="no")
+AC_CHECK_FILE(/usr/include/pcap.h,, filechk="no")
if test "$filechk" = "no"; then
- AC_CHECK_FILE(/usr/local/lib/libpcap.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ AC_CHECK_FILE(/usr/local/include/pcap.h, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
fi
if test "$filechk" = "no"; then AC_MSG_ERROR([
-Libpcap archive file (libpcap.a) not found in /usr or /usr/local!
+Libpcap headers file (pcap.h) not found in /usr or /usr/local!
Libpcap-0.7.1 Packet Capture Library is required.
You can download it from official web site: http://www.tcpdump.org/#current
@@ -138,15 +138,15 @@
#
filechk="yes"
-AC_CHECK_FILE(/usr/lib/libncurses.a,, filechk="no")
+AC_CHECK_FILE(/usr/include/ncurses/ncurses.h,, filechk="no")
if test "$filechk" = "no"; then
- AC_CHECK_FILE(/usr/local/lib/libncurses.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ AC_CHECK_FILE(/usr/local/include/ncurses/ncurses.h, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
fi
if test "$filechk" = "no";
then AC_MSG_WARN([
-Libncurses archive file (libncurses.a) not found in /usr or /usr/local!
+Libncurses headers file (ncurses.h) not found in /usr or /usr/local!
Ncurses library (*) not found in your system.
You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
@@ -174,15 +174,15 @@
#
filechk="yes"
-AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no")
+AC_CHECK_FILE(/usr/include/ncurses/menu.h,, filechk="no")
if test "$filechk" = "no"; then
- AC_CHECK_FILE(/usr/local/lib/libmenu.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ AC_CHECK_FILE(/usr/local/include/ncurses/menu.h, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
fi
if test "$filechk" = "no";
then AC_MSG_WARN([
-Menu archive file (libncurses.a) not found in /usr or /usr/local!
+Menu headers file (ncurses.h) not found in /usr or /usr/local!
Menu library (*) not found in your system.
More information about the pld-devel-pl
mailing list