]>
Commit | Line | Data |
---|---|---|
c069375f TP |
1 | Summary: A tool for capturing and visualizing network traffic |
2 | Name: jpcap | |
3 | Version: 0.01.16 | |
4 | Release: 1 | |
5 | License: MPL 1.1 | |
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) | |
15 | ||
16 | %description | |
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 | |
20 | communications. | |
21 | ||
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. | |
25 | ||
26 | Internally, jpcap provides Java-native bindings to and relies on libpcap. | |
27 | Jpcap also requires JDK1.2. JDK1.3+ is recommended. | |
28 | ||
29 | Install jpcap if you'd like to see what's happening on your network. | |
30 | ||
31 | %prep | |
32 | %setup -q | |
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 | |
35 | ||
36 | %build | |
37 | MAKE_HOME=`pwd`/make | |
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 | |
39 | OSTYPE=linux | |
40 | export OSTYPE MAKE_HOME CLASSPATH | |
41 | %{__make} clean | |
42 | %{__make} | |
43 | ||
93db76d9 TP |
44 | export RELEASE_HOME=`pwd` |
45 | make -C src/java/net/sourceforge/jpcap release | |
46 | ||
c069375f TP |
47 | %install |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
93db76d9 TP |
50 | MAKE_HOME=`pwd`/make |
51 | RELEASE_HOME=`pwd` | |
52 | export RELEASE_HOME MAKE_HOME | |
c069375f TP |
53 | %{__make} setup_pkgroot \ |
54 | PKG_ROOT=$RPM_BUILD_ROOT | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
61 | %doc README docs | |
62 | # src/java/net/sourceforge/jpcap/{tutorial,README} | |
63 | %attr(755,root,root) %{_bindir}/%{name} | |
64 | %attr(755,root,root) %{_libdir}/%{name}.so | |
65 | %{_libdir}/%{name}-%{version} |