%define dotests 1 Name: libpcap Version: 1.10.0 Release: 1 Summary: A system-independent interface for user-level packet capture Group: Development/Libraries License: BSD URL: http://www.tcpdump.org BuildRequires: flex >= 2.6.1 BuildRequires: dbus >= 1.11.12-1 BuildRequires: dbus-devel >= 1.11.12-1 Requires: libgcc >= 8.3.0 Requires: dbus >= 1.11.12-1 Source0: https://www.tcpdump.org/release/libpcap-%{version}.tar.gz #Source1: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig Source2: %{name}.so.0.9.8-aix32 Source3: %{name}.so.0.9.8-aix64 %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. Install libpcap if you need to do low-level network traffic monitoring on your network. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries and header files for the libpcap library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel 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. This package provides the libraries, include files, and other resources needed for developing libpcap applications. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %build export CC="gcc -maix64 -O2" export AR="/usr/bin/ar -X32_64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-ipv6 \ --with-pcap=bpf make %{?_smp_mflags} if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) /usr/sbin/slibclean fi mv shr.o shr_64.o make distclean # now build the 32-bit version export OBJECT_MODE=32 export CC="gcc -maix32 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -O2" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-ipv6 \ --with-pcap=bpf make %{?_smp_mflags} if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) /usr/sbin/slibclean fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install # hack to generate AIX-style shared libraries rm -f ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a /usr/bin/ar -X32 -rv ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a shr.o /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a shr_64.o # Add the older 0.9.8 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} %{name}.so.0.9.8 /usr/bin/strip -X32 -e %{name}.so.0.9.8 /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a %{name}.so.0.9.8 cp %{SOURCE3} %{name}.so.0.9.8 /usr/bin/strip -X64 -e %{name}.so.0.9.8 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a %{name}.so.0.9.8 %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc LICENSE README.md doc/README.aix INSTALL.md CHANGES CREDITS %{_libdir}/*.a %files devel %defattr(-,root,system) %{_bindir}/* %{_includedir}/* %{_mandir}/man3/* %changelog * Wed Apr 14 2021 Reshma V Kumar - 1.10.0-1 - Update to 1.10.0 - Stop shipping files in /usr directory * Thu Nov 21 2019 Baanu Tumma - 1.9.1-1 - Updated to 1.9.1, fixing CVEs CVE-2019-15165 CVE-2019-15161 CVE-2019-15162 CVE-2019-15163 CVE-2019-15164 * Sun Nov 04 2018 Ravi Hirekurabar - 1.9.0-1 - Updated to 1.9.0 - Built with gcc * Mon Nov 21 2016 Ravi Hirekurabar 1.8.1-1 - Updated to Version 1.8.1 * Thu Apr 14 2016 Ravi Hirekurabar 1.7.4 - Update to Version 1.7.4 * Thu Aug 19 2004 David Clissold 0.8.3-1 - Update to version 0.8.3 * Mon Jan 19 2004 David Clissold 0.8.1-1 - Update to version 0.8.1 * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Mon Nov 05 2001 Marc Stephenson - Squash /usr/lib link due to conflict with bos.net.tcp.server * Wed Jun 27 2001 Marc Stephenson - Ship the include files * Tue May 22 2001 Olof Johansson - Added IA64 hooks * Mon May 21 2001 Olof Johansson - First version