libnet/libnet.spec
lvgenggeng 843970b945 backport: fix possible overflows
Signed-off-by: lvgenggeng <lvgenggeng@uniontech.com>
(cherry picked from commit 63e91864340cccb5fbb78f1efa2b0a9db56c9544)
2024-02-17 16:47:28 +08:00

82 lines
2.0 KiB
RPMSpec

Name: libnet
Version: 1.2
Release: 2
Summary: A C library to help with construction and handling of network packets
License: BSD
URL: https://github.com/libnet/libnet/
Source: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
Patch0: backport-Fix-possible-overflows.patch
BuildRequires: automake autoconf libtool
%description
Libbet provides a fairly portable framework for network packet
construction an injuction.
%package devel
Summary: development files are included in this package
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains libraries and header files.
%package help
Summary: help files are included in this package
Requires: %{name}%{?_isa} = %{version}-%{release}
%description help
This package contains help documents.
%prep
%autosetup -p1
autoreconf -if
rm -rf __dist_sample
mkdir __dist_sample
cp -a sample __dist_sample
%build
%configure
%make_build
%install
%make_install INSTALL='install -p'
%delete_la_and_a
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 -cr __dist_sample/sample/libnet_test.h{,.new}
mv -f __dist_sample/sample/libnet_test.h{.new,}
rm -f doc/html/Makefile*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_libdir}/%{name}.so.*
%files devel
%doc __dist_sample/sample/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_bindir}/%{name}-config
%{_includedir}/%{name}/
%{_includedir}/libnet.h
%files help
%doc README.md ChangeLog.md doc/MIGRATION.md doc/RAWSOCKET.md
%doc %{_docdir}/*
%changelog
* Wed Dec 27 2023 lvgenggeng<lvgenggeng@uniontech.com> - 1.2-2
- backport: fix possible overflows
* Wed Aug 19 2020 yuboyun<yuboyun@huawei.com> - 1.2-1
- Update to version 1.2
* Tue Sep 17 2019 Yiru Wang <wangyiru1@huawei.com> - 1.1.6-17
- Pakcage init