Upgrade to 1.2 (#1912031)

This commit is contained in:
Robert Scheck 2021-01-02 22:31:52 +01:00
parent 295852e3ad
commit b204e6ac44
3 changed files with 62 additions and 59 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
libnet-1.1.5.tar.gz /libnet-*.tar.gz
/libnet-1.1.6.tar.gz

View File

@ -1,13 +1,13 @@
Summary: C library for portable packet creation and injection Summary: C library for portable packet creation and injection
Name: libnet Name: libnet
Version: 1.1.6 Version: 1.2
Release: 20%{?dist} Release: 1%{?dist}
License: BSD License: BSD
URL: http://www.sourceforge.net/projects/libnet-dev/ URL: https://github.com/libnet/libnet
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz Source0: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 BuildRequires: gcc
BuildRequires: autoconf, automake, libtool BuildRequires: make
%endif BuildRequires: %{_bindir}/pod2man
%description %description
Libnet is an API to help with the construction and handling of network Libnet is an API to help with the construction and handling of network
@ -18,80 +18,84 @@ layer and at the link layer as well as a host of supplementary and
complementary functionality. complementary functionality.
%package devel %package devel
Summary: Development files for the libnet library Summary: Development files for the libnet library
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel %description devel
The libnet-devel package includes header files and libraries necessary The libnet-devel package includes header files and libraries necessary
for developing programs which use the libnet library. Libnet is very handy for developing programs which use the libnet library. Libnet is very
with which to write network tools and network test code. See the manpage handy with which to write network tools and network test code. See the
and sample test code for more detailed information. man page and sample test code for more detailed information.
%if 0%{!?_without_doc:1}
%package doc
Summary: Documentation files for the libnet library
BuildArch: noarch
BuildRequires: doxygen
BuildRequires: graphviz
%description doc
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. This package contains the API documentation for
developing applications that use libnet.
%endif
%prep %prep
%setup -q %setup -q
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 # Avoid library soname bump (https://github.com/libnet/libnet/issues/115)
autoreconf --force --install sed -e 's/-version-info 9:0:0/-version-info 9:0:8/' -i src/Makefile.{am,in}
%endif
# Keep the sample directory untouched by make
rm -rf __dist_sample
mkdir __dist_sample
cp -a sample __dist_sample
%build %build
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
%configure --libdir=/%{_lib}
%else
%configure %configure
%endif %make_build
make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT %make_install INSTALL='install -p'
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 # Don't install any libtool .la files
# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.{a,la,so}
pushd $RPM_BUILD_ROOT/%{_lib}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so
popd
%else
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la} rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la}
%endif
# Prepare samples directory and perform some fixes # Clean up for later usage in documentation
rm -rf __dist_sample/sample/win32 rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}
rm -f __dist_sample/sample/Makefile.{am,in}
sed -e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
__dist_sample/sample/libnet_test.h > __dist_sample/sample/libnet_test.h.new
touch -c -r __dist_sample/sample/libnet_test.h{,.new}
mv -f __dist_sample/sample/libnet_test.h{.new,}
# Remove makefile relics from documentation # Prepare samples for usage in documentation
rm -f doc/html/Makefile* rm -rf sample/{Makefile*,win32}
for file in sample/*.[hc]; do
sed \
-e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
-e 's@#include "../include/config.h"@#include <config.h>@' \
$file > $file.new
touch -c -r $file{,.new}
mv -f $file{.new,}
done
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files
%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING %license LICENSE
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %doc README.md ChangeLog.md
/%{_lib}/%{name}.so.*
%else
%{_libdir}/%{name}.so.* %{_libdir}/%{name}.so.*
%endif
%files devel %files devel
%doc doc/CHANGELOG doc/CONTRIB doc/COPYING doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING %doc doc/MIGRATION.md doc/RAWSOCKET.md sample/
%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
%{_bindir}/%{name}-config %{_bindir}/%{name}-config
%{_libdir}/%{name}.so %{_libdir}/%{name}.so
%{_includedir}/libnet.h %{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}.h
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%{_mandir}/man3/%{name}*.3* %{_mandir}/man3/%{name}*.3*
%if 0%{!?_without_doc:1}
%files doc
%doc doc/html/
%endif
%changelog %changelog
* Sat Jan 02 2021 Robert Scheck <robert@fedoraproject.org> 1.2-1
- Upgrade to 1.2 (#1912031)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-20 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz SHA512 (libnet-1.2.tar.gz) = 84430f24e000eb7728b1fbb5e620716d13d193e8b9e024cf56a08fbeeeaaf56c9122caaf7647f01e6b38b73212e592fa5cc4e8ff56b1d5f5a73aea462e84edd6