1 |
%define major 1 |
2 |
%define libname %mklibname pcap %{major} |
3 |
%define develname %mklibname pcap -d |
4 |
|
5 |
Name: libpcap |
6 |
Version: 1.10.2 |
7 |
Release: %mkrel 1 |
8 |
Summary: A system-independent interface for user-level packet capture |
9 |
License: BSD |
10 |
Group: System/Libraries |
11 |
URL: https://www.tcpdump.org/ |
12 |
Source0: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz |
13 |
Patch0: libpcap-multilib.patch |
14 |
Patch1: libpcap-man.patch |
15 |
Patch2: libpcap-1.9.0-lpthread.patch |
16 |
BuildRequires: bison |
17 |
BuildRequires: flex |
18 |
BuildRequires: pkgconfig(libnl-3.0) |
19 |
BuildRequires: pkgconfig(libusb-1.0) |
20 |
BuildRequires: pkgconfig(bluez) |
21 |
|
22 |
%description |
23 |
Libpcap provides a portable framework for low-level network monitoring. Libpcap |
24 |
can provide network statistics collection, security monitoring and network |
25 |
debugging. Since almost every system vendor provides a different interface for |
26 |
packet capture, the libpcap authors created this system-independent API to ease |
27 |
in porting and to alleviate the need for several system-dependent packet |
28 |
capture modules in each application. |
29 |
|
30 |
%package doc |
31 |
Summary: Manual pages for %{name} |
32 |
Group: Documentation |
33 |
BuildArch: noarch |
34 |
|
35 |
%description doc |
36 |
This contains the manual pages documenting %{name}. |
37 |
|
38 |
%package -n %{libname} |
39 |
Summary: A system-independent interface for user-level packet capture |
40 |
Group: System/Libraries |
41 |
Provides: %{name} = %{version}-%{release} |
42 |
Provides: pcap = %{version}-%{release} |
43 |
|
44 |
%description -n %{libname} |
45 |
Libpcap provides a portable framework for low-level network monitoring. Libpcap |
46 |
can provide network statistics collection, security monitoring and network |
47 |
debugging. Since almost every system vendor provides a different interface for |
48 |
packet capture, the libpcap authors created this system-independent API to ease |
49 |
in porting and to alleviate the need for several system-dependent packet |
50 |
capture modules in each application. |
51 |
|
52 |
%package -n %{develname} |
53 |
Summary: Static library and header files for the pcap library |
54 |
Group: Development/C |
55 |
Requires: %{libname} = %{version}-%{release} |
56 |
Provides: pcap-devel = %{version}-%{release} |
57 |
Provides: %{name}-devel = %{version}-%{release} |
58 |
|
59 |
%description -n %{develname} |
60 |
Libpcap provides a portable framework for low-level network monitoring. Libpcap |
61 |
can provide network statistics collection, security monitoring and network |
62 |
debugging. Since almost every system vendor provides a different interface for |
63 |
packet capture, the libpcap authors created this system-independent API to ease |
64 |
in porting and to alleviate the need for several system-dependent packet |
65 |
capture modules in each application. |
66 |
|
67 |
This package contains the static pcap library and its header files needed to |
68 |
compile applications such as tcpdump, etc. |
69 |
|
70 |
%prep |
71 |
%setup -q |
72 |
%autopatch -p1 |
73 |
|
74 |
%build |
75 |
autoreconf -vfi |
76 |
export CFLAGS="%{optflags} -fno-strict-aliasing" |
77 |
|
78 |
%configure \ |
79 |
--enable-ipv6 |
80 |
|
81 |
%make_build |
82 |
|
83 |
%install |
84 |
%make_install |
85 |
|
86 |
# install additional headers |
87 |
install -m0644 pcap-int.h %{buildroot}%{_includedir}/ |
88 |
|
89 |
rm -f %{buildroot}%{_libdir}/libpcap.a |
90 |
|
91 |
%files -n %{libname} |
92 |
%doc README* |
93 |
%license CREDITS LICENSE |
94 |
%{_libdir}/libpcap.so.%{major}{,.*} |
95 |
|
96 |
%files doc |
97 |
%{_mandir}/man?/* |
98 |
|
99 |
%files -n %{develname} |
100 |
%doc CHANGES TODO |
101 |
%{_bindir}/pcap-config |
102 |
%dir %{_includedir}/pcap |
103 |
%{_includedir}/pcap/*.h |
104 |
%{_includedir}/*.h |
105 |
%{_libdir}/libpcap.so |
106 |
%{_libdir}/pkgconfig/libpcap.pc |