Andrzej Krzysztofowicz wrote:

nie jest najlepszym pomyslem.

Raczej nalezaloby sprawdzic sciezke do plikow na poziomie ac/am lub dopisac odpowiednie -I do polecenia kompilacji, jesli ac/am nie jest tu uzywane.

Ostatnio ktoś powiedział że może być i tak zostało :)

W załączniku zmieniony spec, po sprawdzeniu ścieżki w ac wystarcza jeden patch.

Pozdrawiam
gzehop
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    2008-03-07 17:04:02.000000000 +0100
@@ -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, 
CPPFLAGS="-I/usr/include/ncurses", 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/ncurses")
 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
@@ -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
@@ -174,15 +174,15 @@
 #
 
 filechk="yes"
-AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no")
+AC_CHECK_FILE(/usr/include/ncurses/menu.h, CPPFLAGS="-I/usr/include/ncurses", 
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/ncurses")
 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.
@@ -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
# $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_nonstatic.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

%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 <[EMAIL PROTECTED]>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log:$


_______________________________________________
pld-devel-pl mailing list
pld-devel-pl@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym