libdnet/libdnet.spec
2021-01-27 16:12:02 +08:00

120 lines
2.6 KiB
RPMSpec

Name: libdnet
Version: 1.14
Release: 1
Summary: Simple portable interface work with low-level networking routines
License: BSD
URL: https://github.com/ofalk/%{name}
Source: https://github.com/ofalk/libdnet/archive/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: python3-Cython
%description
%{name} provides a simplified, portable interface to several low-level networking
routines, including network address manipulation, kernel arp and route table
manipulation, firewalling, interface configuration, IP tunnelling, and raw Ethernet
and IP datagram transmission.
%package devel
Summary: Header files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
%{name}-devel contains the header files for developing
applications that want to make use of %{name}
%package progs
Summary: Sample applications to use with %{name}
Requires: %{name} = %{version}-%{release}
%description progs
%{name}-progs contains sample applications that want to make use of %{name}
%package -n python3-%{name}
%{?python_provide:%python_provide python3-%{name}}
Provides: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-python
Summary: Python bindings for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: python3-devel
%description -n python3-%{name}
Python3 package for python-%{name}
%package_help
%prep
%autosetup -n %{name}-%{name}-%{version} -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure
%disable_rpath
%make_build
pushd python
%{__python3} setup.py build
popd
%install
%{__make} install DESTDIR=%{buildroot}
pushd python
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%delete_la
%ldconfig_scriptlets
%files
%defattr(-,root,root)
%license LICENSE
%{_libdir}/%{name}.so.*
%files devel
%defattr(-,root,root)
%{_bindir}/dnet-config
%{_libdir}/%{name}.so
%{_includedir}/dnet/*.h
%{_includedir}/dnet.h
%{_libdir}/*.a
%files progs
%defattr(-,root,root)
%{_sbindir}/*
%files -n python3-%{name}
%defattr(-,root,root)
%{python3_sitearch}/*
%files help
%defattr(-,root,root)
%doc THANKS TODO
%{_mandir}/man3/*.3*
%{_mandir}/man8/*.8*
%changelog
* Wed Jan 27 2021 xihaochen <xihaochen@huawei.com> - 1.14-1
- Type:requirements
- ID:NA
- SUG:NA
- DESC: update libdnet to 1.14
* Thu Oct 29 2020 gaihuiying <gaihuiying1@huawei.com> - 1.12 - 30
- Type:rquirement
- ID:NA
- SUG:NA
- DESC:remove python2, and switch to python3
* Fri Sep 11 2020 lunankun <lunankun@huawei.com> - 1.12 - 29
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix source0 url
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.12 - 28
- Package init