2007-01-15 23:22:30 +00:00
|
|
|
#
|
2011-05-05 21:05:18 +00:00
|
|
|
# spec file for package libnet
|
2007-01-15 23:22:30 +00:00
|
|
|
#
|
2023-10-24 07:51:32 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2007-01-15 23:22:30 +00:00
|
|
|
#
|
2008-09-05 18:26:04 +00:00
|
|
|
# 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.
|
|
|
|
|
2020-09-23 08:42:25 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:22:30 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-05-13 14:01:34 +00:00
|
|
|
%define libname libnet9
|
2007-01-15 23:22:30 +00:00
|
|
|
Name: libnet
|
2023-10-24 07:51:32 +00:00
|
|
|
Version: 1.3
|
2014-05-13 14:01:34 +00:00
|
|
|
Release: 0
|
2007-01-15 23:22:30 +00:00
|
|
|
Summary: A C Library for Portable Packet Creation
|
2012-02-13 13:14:43 +00:00
|
|
|
License: BSD-3-Clause
|
2010-11-20 11:04:52 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2020-09-23 08:42:25 +00:00
|
|
|
URL: https://codedocs.xyz/libnet/libnet/
|
|
|
|
Source0: https://github.com/libnet/libnet/releases/download/v%{version}/libnet-%{version}.tar.gz
|
2013-12-19 11:07:33 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2020-09-23 08:42:25 +00:00
|
|
|
BuildRequires: doxygen
|
2011-11-19 21:05:40 +00:00
|
|
|
BuildRequires: libtool
|
2007-01-15 23:22:30 +00:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2014-01-02 09:30:47 +00:00
|
|
|
%package -n %{libname}
|
2010-11-20 11:04:52 +00:00
|
|
|
Summary: A C Library for Portable Packet Creation
|
|
|
|
Group: Development/Libraries/C and C++
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2014-01-02 09:30:47 +00:00
|
|
|
%description -n %{libname}
|
2010-11-20 11:04:52 +00:00
|
|
|
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.
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%package devel
|
2010-11-20 11:04:52 +00:00
|
|
|
Summary: Devel files for libnet
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-01-02 09:30:47 +00:00
|
|
|
Requires: %{libname} = %{version}
|
2010-11-20 11:04:52 +00:00
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%description devel
|
2010-11-20 11:04:52 +00:00
|
|
|
Libnet is an API to help with the construction and handling of network
|
|
|
|
packets. This package contains devel files.
|
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%package doc
|
2010-11-20 11:04:52 +00:00
|
|
|
Summary: Documentation for libnet
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%description doc
|
2010-11-20 11:04:52 +00:00
|
|
|
Libnet is an API to help with the construction and handling of network
|
|
|
|
packets. This package contains documentation.
|
2007-01-15 23:22:30 +00:00
|
|
|
|
|
|
|
%prep
|
2022-02-09 09:33:09 +00:00
|
|
|
%autosetup -p1
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2013-12-19 11:07:33 +00:00
|
|
|
rm -rf sample/win32
|
2013-10-03 12:55:43 +00:00
|
|
|
# HACK: to have samples/ dir untouched and ready for installation
|
|
|
|
cp -r sample sample_doc
|
|
|
|
|
2007-01-15 23:22:30 +00:00
|
|
|
%build
|
2013-12-19 11:07:33 +00:00
|
|
|
# no configure in a tarball
|
2010-11-20 11:04:52 +00:00
|
|
|
CFLAGS="%{optflags} -Wall -Wno-unused" \
|
2015-10-23 13:50:53 +00:00
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--with-pic \
|
|
|
|
--with-link-layer=linux
|
2020-09-23 08:42:25 +00:00
|
|
|
%make_build
|
2007-01-15 23:22:30 +00:00
|
|
|
|
|
|
|
%install
|
2020-09-23 08:42:25 +00:00
|
|
|
%make_install
|
2014-05-13 14:01:34 +00:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2013-12-19 11:07:33 +00:00
|
|
|
install -d -m 755 %{buildroot}/%{_bindir}
|
2010-11-20 11:04:52 +00:00
|
|
|
install -m 755 libnet-config %{buildroot}/%{_bindir}
|
2014-05-13 14:01:34 +00:00
|
|
|
|
2013-10-03 12:55:43 +00:00
|
|
|
rm -rf sample/
|
|
|
|
# HACK: rename untouched dir back
|
|
|
|
mv sample_doc sample
|
2014-05-13 14:01:34 +00:00
|
|
|
find doc/ -name "Makefile*" -o -name ".libs" | xargs rm -rf
|
2020-09-23 08:42:25 +00:00
|
|
|
rm -rf %{buildroot}/usr/share/doc/%{name}
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2014-01-02 09:30:47 +00:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2014-01-02 09:30:47 +00:00
|
|
|
%files -n %{libname}
|
2020-09-23 08:42:25 +00:00
|
|
|
%license LICENSE
|
2014-05-13 14:01:34 +00:00
|
|
|
%{_libdir}/libnet.so.*
|
2010-11-20 11:04:52 +00:00
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%files devel
|
2010-11-20 11:04:52 +00:00
|
|
|
%{_bindir}/libnet-config
|
|
|
|
%{_includedir}/libnet*
|
2008-09-09 17:08:53 +00:00
|
|
|
%{_libdir}/libnet.so
|
2023-10-24 07:51:32 +00:00
|
|
|
%{_mandir}/man1/*
|
2014-05-13 14:05:11 +00:00
|
|
|
%{_mandir}/man3/*
|
2020-09-23 08:42:25 +00:00
|
|
|
%{_libdir}/pkgconfig/libnet.pc
|
2007-01-15 23:22:30 +00:00
|
|
|
|
2011-02-10 12:35:56 +00:00
|
|
|
%files doc
|
|
|
|
%doc doc/* sample
|
2010-11-20 11:04:52 +00:00
|
|
|
|
2007-03-15 00:43:26 +00:00
|
|
|
%changelog
|