Upgrade to 1.2 (#1912031)
This commit is contained in:
parent
295852e3ad
commit
b204e6ac44
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
libnet-1.1.5.tar.gz
|
||||
/libnet-1.1.6.tar.gz
|
||||
/libnet-*.tar.gz
|
||||
|
116
libnet.spec
116
libnet.spec
@ -1,13 +1,13 @@
|
||||
Summary: C library for portable packet creation and injection
|
||||
Name: libnet
|
||||
Version: 1.1.6
|
||||
Release: 20%{?dist}
|
||||
License: BSD
|
||||
URL: http://www.sourceforge.net/projects/libnet-dev/
|
||||
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||
BuildRequires: autoconf, automake, libtool
|
||||
%endif
|
||||
Summary: C library for portable packet creation and injection
|
||||
Name: libnet
|
||||
Version: 1.2
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
URL: https://github.com/libnet/libnet
|
||||
Source0: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: %{_bindir}/pod2man
|
||||
|
||||
%description
|
||||
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.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for the libnet library
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Summary: Development files for the libnet library
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
The libnet-devel package includes header files and libraries necessary
|
||||
for developing programs which use the libnet library. Libnet is very handy
|
||||
with which to write network tools and network test code. See the manpage
|
||||
and sample test code for more detailed information.
|
||||
for developing programs which use the libnet library. Libnet is very
|
||||
handy with which to write network tools and network test code. See the
|
||||
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
|
||||
%setup -q
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||
autoreconf --force --install
|
||||
%endif
|
||||
|
||||
# Keep the sample directory untouched by make
|
||||
rm -rf __dist_sample
|
||||
mkdir __dist_sample
|
||||
cp -a sample __dist_sample
|
||||
# Avoid library soname bump (https://github.com/libnet/libnet/issues/115)
|
||||
sed -e 's/-version-info 9:0:0/-version-info 9:0:8/' -i src/Makefile.{am,in}
|
||||
|
||||
%build
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
%configure --libdir=/%{_lib}
|
||||
%else
|
||||
%configure
|
||||
%endif
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
|
||||
%make_install INSTALL='install -p'
|
||||
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
# 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
|
||||
# Don't install any libtool .la files
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la}
|
||||
%endif
|
||||
|
||||
# Prepare samples directory and perform some fixes
|
||||
rm -rf __dist_sample/sample/win32
|
||||
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,}
|
||||
# Clean up for later usage in documentation
|
||||
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}
|
||||
|
||||
# Remove makefile relics from documentation
|
||||
rm -f doc/html/Makefile*
|
||||
# Prepare samples for usage in documentation
|
||||
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
|
||||
|
||||
%files
|
||||
%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
/%{_lib}/%{name}.so.*
|
||||
%else
|
||||
%license LICENSE
|
||||
%doc README.md ChangeLog.md
|
||||
%{_libdir}/%{name}.so.*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%doc doc/CHANGELOG doc/CONTRIB doc/COPYING doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING
|
||||
%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
|
||||
%doc doc/MIGRATION.md doc/RAWSOCKET.md sample/
|
||||
%{_bindir}/%{name}-config
|
||||
%{_libdir}/%{name}.so
|
||||
%{_includedir}/libnet.h
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_includedir}/%{name}.h
|
||||
%{_includedir}/%{name}/
|
||||
%{_mandir}/man3/%{name}*.3*
|
||||
|
||||
%if 0%{!?_without_doc:1}
|
||||
%files doc
|
||||
%doc doc/html/
|
||||
%endif
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user