SHA256
8
0
forked from pool/libnet
Files
libnet/libnet.spec
Adam Majer 1ad8e87a2c Accepting request 1119874 from home:polslinux:branches:devel:libraries:c_c++
- update to 1.3:
  * Add support for LLDP, mandatory TLVs.
  * Add support for Cisco UniDirectional Link Detection (UDLD), RFC5171
  * Calling libnet_init() with a RAW type no longer sets a TX buffer max
    size. Use the new libnet_setfd_max_sndbuf() instead when needed.
  * Fix #122: unused parameter warnings
  * Fix #123: potential memory leak in libnet_cq_add()
  * Fix #124: potential name conflict with C++ keyword new
  * Fix #96: pointer type warnings when dumping raw data with %p
  * Fix #97: non-standard types
  * Fix #98: lots of signed vs unsigned comparisons
  * Fix #102: possible buffer overflows in libnet_plist_chain_dump_string()
  * Fix #120: possible NULL pointer dereference in libnet_cq_add()
  * Fix #120: memory leak in libnet_plist_chain_new()
  * Fix segmentation fault in libnet_ifaddrlist()
  * Fix #150: segfault when number of IPs > 512
- Drop upstreamed reproducible.patch

OBS-URL: https://build.opensuse.org/request/show/1119874
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libnet?expand=0&rev=40
2023-10-24 07:51:32 +00:00

119 lines
3.6 KiB
RPMSpec

#
# spec file for package libnet
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define libname libnet9
Name: libnet
Version: 1.3
Release: 0
Summary: A C Library for Portable Packet Creation
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://codedocs.xyz/libnet/libnet/
Source0: https://github.com/libnet/libnet/releases/download/v%{version}/libnet-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: libtool
%description
Libnet is an API to help with the construction and handling of network
packets. It provides a portable framework for low-level network packet
writing and handling. Libnet includes packet creation at the IP layer
and at the link layer as well as a host of supplementary and
complementary functionality. Libnet is very useful for writing network
tools and network test code. See the man page and sample test code for
more detailed information.
%package -n %{libname}
Summary: A C Library for Portable Packet Creation
Group: Development/Libraries/C and C++
%description -n %{libname}
Libnet is an API to help with the construction and handling of network
packets. It provides a portable framework for low-level network packet
writing and handling. Libnet includes packet creation at the IP layer
and at the link layer as well as a host of supplementary and
complementary functionality. Libnet is very useful for writing network
tools and network test code. See the man page and sample test code for
more detailed information.
%package devel
Summary: Devel files for libnet
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
Libnet is an API to help with the construction and handling of network
packets. This package contains devel files.
%package doc
Summary: Documentation for libnet
Group: Development/Libraries/C and C++
%description doc
Libnet is an API to help with the construction and handling of network
packets. This package contains documentation.
%prep
%autosetup -p1
rm -rf sample/win32
# HACK: to have samples/ dir untouched and ready for installation
cp -r sample sample_doc
%build
# no configure in a tarball
CFLAGS="%{optflags} -Wall -Wno-unused" \
%configure \
--disable-static \
--with-pic \
--with-link-layer=linux
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
install -d -m 755 %{buildroot}/%{_bindir}
install -m 755 libnet-config %{buildroot}/%{_bindir}
rm -rf sample/
# HACK: rename untouched dir back
mv sample_doc sample
find doc/ -name "Makefile*" -o -name ".libs" | xargs rm -rf
rm -rf %{buildroot}/usr/share/doc/%{name}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%license LICENSE
%{_libdir}/libnet.so.*
%files devel
%{_bindir}/libnet-config
%{_includedir}/libnet*
%{_libdir}/libnet.so
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_libdir}/pkgconfig/libnet.pc
%files doc
%doc doc/* sample
%changelog