1 Summary: A tool for capturing and visualizing network traffic
6 Group: Development/Languages/Java
7 Source0: http://downloads.sourceforge.net/jpcap/%{name}-%{version}.tar.gz
8 # Source0-md5: 2307e2956dc2d4da1e9891bf22e8f7b4
9 URL: http://jpcap.sourceforge.net/
10 BuildRequires: jpackage-utils
11 BuildRequires: jdk >= 1.2
12 BuildRequires: libpcap-devel >= 0.4
13 BuildRequires: sed >= 4.0
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Jpcap captures network packets and allows the visualization of traffic
18 patterns in real-time. Users can define filter expressions, examine packet
19 data and manipulate graphical representations of hosts and network
22 Included is a jar file containing the jpcap packet capture library
23 which can be used by Java developers who wish to create their own
24 packet capture applications.
26 Internally, jpcap provides Java-native bindings to and relies on libpcap.
27 Jpcap also requires JDK1.2. JDK1.3+ is recommended.
29 Install jpcap if you'd like to see what's happening on your network.
33 sed -e 's|-lnsl /usr/lib/libpcap.a|-lnsl -lpcap|' -i src/java/net/sourceforge/jpcap/capture/makefile
34 sed -e 's|for(;ifr < last; (char\*)ifr += ifrSize) {|for(;ifr < last; ifr = (ifreq*)((char*)ifr + ifrSize)) {|' -i src/java/net/sourceforge/jpcap/capture/jpcap.c
38 CLASSPATH=`pwd`/src/java:`pwd`/thirdParty/jars/junit.jar:`pwd`/thirdParty/jars/fooware_CommandLine-1.0.jar:`pwd`/thirdParty/jars/dev-classes_net.ultrametrics-0.03.jar
40 export OSTYPE MAKE_HOME CLASSPATH
44 export RELEASE_HOME=`pwd`
45 make -C src/java/net/sourceforge/jpcap release
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT%{_libdir}
53 export RELEASE_HOME MAKE_HOME
54 %{__make} setup_pkgroot \
55 PKG_ROOT=$RPM_BUILD_ROOT%{_prefix}
57 [ "%{_lib}" != 'lib' ] && %{__mv} $RPM_BUILD_ROOT{%{_prefix}/lib/%{name}.so,%{_libdir}}
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
65 # src/java/net/sourceforge/jpcap/{tutorial,README}
66 %attr(755,root,root) %{_bindir}/%{name}
67 %attr(755,root,root) %{_libdir}/%{name}.so
68 %{_exec_prefix}/lib/%{name}-%{version}