Пакет libdnet: Specfile

%def_enable python3

Name: libdnet
Version: 1.16.4
Release: alt1

Summary: A dumb networking library
Group: System/Libraries
License: BSD-3-Clause
Url: https://github.com/ofalk/libdnet

Source: libdnet-%version-%release.tar

## Automatically added by buildreq on Mon Jul 31 2023
## optimized out: glibc-kernheaders-generic glibc-kernheaders-x86 gnu-config libgpg-error libstdc++-devel perl pkg-config python3 python3-base python3-dev python3-module-pkg_resources sh4
#BuildRequires: gcc-c++ libcheck-devel python3-module-Cython python3-module-setuptools

# The list generated by the buildreq(1) utility was manually divided:
BuildRequires: gcc-c++ libcheck-devel
%{?_enable_python:python3-module-Cython python3-module-setuptools}

%package devel
Summary: Development libdnet library, header files, documentation and examples
Group: Development/C
Requires: %name = %version-%release

%package -n dnet
Summary: A dumb networking library test program
Group: Networking/Other
Requires: %name = %version-%release

%description
libdnet provides a simplified, portable interface to several low-level
networking routines, including network address manipulation, kernel
arp(4) cache and route(4) table lookup and manipulation, network
firewalling, network interface lookup and manipulation, and raw IP
packet and Ethernet frame transmission.

%description devel
libdnet provides a simplified, portable interface to several low-level
networking routines, including network address manipulation, kernel
arp(4) cache and route(4) table lookup and manipulation, network
firewalling, network interface lookup and manipulation, and raw IP
packet and Ethernet frame transmission.

This package contains the development library, it's header files,
documentation and examples needed to develop libdnet-based applications.

%description -n dnet
dnet is a simple test program for the dnet(3) library. It can be used
to compose and transmit network datagrams as a Unix-style filter (e.g.
reading from or writing to files and pipes) or modify the local system
network configuration (including the ARP cache, firewall ruleset,
network interfaces, and routing table).

%package -n python3-module-dnet
Summary: Python bindings for libdnet, a dumb networking library
Group: Development/Python3
Requires: %name = %version-%release

%description -n python3-module-dnet
Python interface for accessing libdnet-provided functions.

%prep
%setup -n libdnet-%version-%release

%build
%autoreconf

export ac_cv_dnet_linux_procfs=yes
%configure \
	--disable-static \
%if_enabled python
	--with-python \
%endif
	#

%make_build

%install
%makeinstall_std

%set_verify_elf_method strict
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1

%files
%_libdir/libdnet.so.1*
%doc LICENSE README.md THANKS TODO

%files devel
%_bindir/dnet-config
%_libdir/libdnet.so
%_includedir/dnet.h
%_includedir/dnet
%_man3dir/dnet.3*

%files -n dnet
%_sbindir/dnet
%_man8dir/dnet.8*

%if_enabled python
%files -n python3-module-dnet
%python3_sitelibdir/dnet-%version-*.egg
%doc python/test.py python/dnet.pyx
%endif

%changelog
* Mon Jul 31 2023 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.16.4-alt1
- Switched to the new upstream: https://github.com/ofalk/libdnet .
- Updated to 1.16.4.
- Cleaned up the specfile.
- Reenabled the python3 binding.
- Enabled Large File Support.

* Thu Mar 26 2020 Dmitry V. Levin <ldv@altlinux.org> 1.12-alt4
- Do not build python module.

* Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 1.12-alt3.1
- Rebuild with Python-2.7

* Sun Apr 24 2011 Dmitry V. Levin <ldv@altlinux.org> 1.12-alt3
- Rebuilt for debuginfo.

* Sat Nov 06 2010 Dmitry V. Levin <ldv@altlinux.org> 1.12-alt2
- Updated to 1.12+ svn revision 665.

* Wed Nov 25 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.12-alt1.1
- Rebuilt with python 2.6

* Thu Jul 23 2009 Dmitry V. Levin <ldv@altlinux.org> 1.12-alt1
- Updated to 1.12+ svn revision 653.
- Enabled linux /proc support.

* Wed May 06 2009 Dmitry V. Levin <ldv@altlinux.org> 1.11-alt8
- Fixed build with fresh autotools.

* Sun Dec 14 2008 Dmitry V. Levin <ldv@altlinux.org> 1.11-alt7
- Removed obsolete %%post_ldconfig/%%postun_ldconfig calls.

* Sat Jan 13 2007 Dmitry V. Levin <ldv@altlinux.org> 1.11-alt6
- Enabled python bindings.

* Thu Jun 01 2006 Dmitry V. Levin <ldv@altlinux.org> 1.11-alt4
- Applied changes from nmap project.
- Fixed compilations warnings.

* Sat May 27 2006 Dmitry V. Levin <ldv@altlinux.org> 1.11-alt3
- Disabled python bindings until python stuff gets fixed.
- Fixed build with gcc-4.1.x (damir@).

* Thu May 11 2006 Ilya Evseev <evseev@altlinux.ru> 1.11-alt2
- bugfix #9548, thanks to Igor Zubkov <icesik@altlinux.ru>

* Wed Jan 25 2006 Ilya Evseev <evseev@altlinux.ru> 1.11-alt1
- updated to new version 1.11
- NOTE: since release 1.10-alt2 this package uses macros
  defined by rpm-build-python >= 0.20-alt1.

* Tue Mar 29 2005 ALT QA Team Robot <qa-robot@altlinux.org> 1.10-alt2.1
- Rebuilt with python-2.4.

* Mon Feb 28 2005 Dmitry V. Levin <ldv@altlinux.org> 1.10-alt2
- Fixed python bindings packaging to comply with python policy.

* Mon Feb 28 2005 Ilya Evseev <evseev@altlinux.ru> 1.10-alt1
- version 1.10
- python bindings added

* Fri Jan 14 2005 Ilya Evseev <evseev@altlinux.ru> 1.8-alt2
- spec cleanup: most tricks are not needed more because libdnet supports libtool
- dont build static library except rpmbuild is started with '--enable static'

* Sat Jan  8 2005 Ilya Evseev <evseev@altlinux.ru> 1.8-alt1
- Updated to 1.8
- Specfile: added russian summary and descriptions
- Removed Makefile.am patch and rpmbuild/automake build dependencies

* Sat May 03 2003 Dmitry V. Levin <ldv@altlinux.org> 1.7-alt1
- Updated to 1.7, updated patch and build script.

* Sat Nov 02 2002 Dmitry V. Levin <ldv@altlinux.org> 1.5-alt2
- Fixed build.

* Sat Oct 19 2002 Dmitry V. Levin <ldv@altlinux.org> 1.5-alt1
- Updated to 1.5
- %name-devel: added buildreq ignore rule (aka autoconf sux).

* Sun Sep 01 2002 Dmitry V. Levin <ldv@altlinux.org> 1.4-alt1
- Initial revision.