libpcap/libpcap.spec

117 lines
3.3 KiB
RPMSpec
Raw Normal View History

2012-02-01 14:46:41 +04:00
%define major 1
2014-07-13 01:09:49 +11:00
%define libname %mklibname pcap %{major}
%define devname %mklibname pcap -d
2019-04-05 22:55:03 +10:00
2014-07-13 01:09:49 +11:00
%bcond_without bluetooth
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
Summary: A system-independent interface for user-level packet capture
2012-02-01 14:46:41 +04:00
Name: libpcap
2021-01-02 18:33:43 +00:00
Version: 1.10.0
Release: 1
2012-02-01 14:46:41 +04:00
License: BSD
Group: System/Libraries
2014-07-13 01:09:49 +11:00
Url: http://www.tcpdump.org/
2012-02-01 14:46:41 +04:00
Source0: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Source1: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
Patch0: libpcap-1.9.1-multilib.patch
2012-02-01 14:46:41 +04:00
BuildRequires: bison
BuildRequires: flex
2014-07-13 01:09:49 +11:00
%if %{with bluetooth}
BuildRequires: pkgconfig(bluez)
%endif
2012-11-02 19:12:14 +04:00
BuildRequires: pkgconfig(libnl-3.0)
2012-02-01 14:46:41 +04:00
%description
Libpcap provides a portable framework for low-level network monitoring. Libpcap
can provide network statistics collection, security monitoring and network
debugging. Since almost every system vendor provides a different interface for
packet capture, the libpcap authors created this system-independent API to ease
in porting and to alleviate the need for several system-dependent packet
capture modules in each application.
2014-07-13 01:09:49 +11:00
#----------------------------------------------------------------------------
2012-02-01 14:46:41 +04:00
%package doc
2014-07-13 01:09:49 +11:00
Summary: Manual pages for %{name}
Group: Documentation
BuildArch: noarch
2012-02-01 14:46:41 +04:00
%description doc
This contains the manual pages documenting %{name}.
2014-07-13 01:09:49 +11:00
%files doc
%{_mandir}/man5/pcap*
%{_mandir}/man7/pcap*
#----------------------------------------------------------------------------
%package -n %{libname}
2012-02-01 14:46:41 +04:00
Summary: A system-independent interface for user-level packet capture
2014-07-13 01:09:49 +11:00
Group: System/Libraries
Provides: %{name} = %{EVRD}
Provides: pcap = %{EVRD}
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
%description -n %{libname}
2012-02-01 14:46:41 +04:00
Libpcap provides a portable framework for low-level network monitoring. Libpcap
can provide network statistics collection, security monitoring and network
debugging. Since almost every system vendor provides a different interface for
packet capture, the libpcap authors created this system-independent API to ease
in porting and to alleviate the need for several system-dependent packet
capture modules in each application.
2014-07-13 01:09:49 +11:00
%files -n %{libname}
%{_libdir}/libpcap.so.%{major}*
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
#----------------------------------------------------------------------------
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
%package -n %{devname}
Summary: Development library and header files for the pcap library
Group: Development/C
Requires: %{libname} = %{EVRD}
Provides: pcap-devel = %{EVRD}
Provides: %{name}-devel = %{EVRD}
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
%description -n %{devname}
This package contains the development pcap library and its header files needed
to compile applications such as tcpdump, etc.
2012-02-01 14:46:41 +04:00
2014-07-13 01:09:49 +11:00
%files -n %{devname}
%doc README* CREDITS INSTALL.md LICENSE CHANGES TODO
2014-07-13 01:09:49 +11:00
%{_bindir}/pcap-config
%dir %{_includedir}/pcap
%{_includedir}/pcap/*.h
%{_includedir}/*.h
%{_libdir}/libpcap.so
%{_libdir}/pkgconfig/libpcap.pc
2014-07-13 01:09:49 +11:00
%{_mandir}/man1/pcap-config.1*
%{_mandir}/man3/pcap*
2012-08-30 16:42:02 +04:00
2014-07-13 01:09:49 +11:00
#----------------------------------------------------------------------------
2012-08-30 16:42:02 +04:00
2014-07-13 01:09:49 +11:00
%prep
%setup -q
%apply_patches
2012-02-01 14:46:41 +04:00
%build
2017-02-03 14:39:46 +03:00
autoreconf -vfi
2020-01-04 04:22:51 +03:00
%configure \
2014-07-13 01:09:49 +11:00
--enable-ipv6 \
%if %{with bluetooth}
--enable-bluetooth \
%endif
--with-pcap=linux
2012-02-01 14:46:41 +04:00
2020-01-13 15:50:23 +03:00
%make
2012-02-01 14:46:41 +04:00
%install
install -d %{buildroot}%{_bindir}
2020-01-13 15:50:23 +03:00
%makeinstall_std
2012-02-01 14:46:41 +04:00
# install additional headers
install -m0644 pcap-int.h %{buildroot}%{_includedir}/
install -m0644 pcap/bluetooth.h %{buildroot}%{_includedir}/pcap/
2012-08-30 16:42:02 +04:00
# nuke the statis lib
rm -f %{buildroot}%{_libdir}/libpcap.a