Use recent autoconf python detection (#2155003)

Python 3.12 deprecated distutils. Update autoconf detection macro from
autoconf-archive package and regenerate configure always. Would use
always latest macros even if ldns upstream does not use it.
This commit is contained in:
Petr Menšík 2023-01-03 16:32:08 +01:00
parent d07d61a844
commit 2ed7785239

View File

@ -18,8 +18,6 @@
# GOST is not allowed in Fedora/RHEL due to legal reasons (not NIST ECC)
%bcond_with gost
%{?!snapshot: %global snapshot 0}
%if %{with python2} || %{with python3}
%{?filter_setup:
%global _ldns_internal_filter /^_ldns[.]so.*/d;
@ -39,7 +37,7 @@
Summary: Low-level DNS(SEC) library with API
Name: ldns
Version: 1.8.3
Release: 2
Release: 3
License: BSD-3-Clause
Url: https://www.nlnetlabs.nl/%{name}/
@ -49,12 +47,10 @@ Source1: https://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz.as
Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/DC34EE5DB2417BCC151E5100E5F8F8212F77A498#/wtoorop.asc
Patch1: ldns-1.7.0-multilib.patch
# Only needed for builds from svn snapshot
%if 0%{snapshot}
BuildRequires: libtool
BuildRequires: autoconf
BuildRequires: automake
%endif
BuildRequires: autoconf-archive
BuildRequires: gcc, make
BuildRequires: libpcap-devel
@ -67,8 +63,6 @@ BuildRequires: gcc-c++
BuildRequires: doxygen
BuildRequires: gnupg2
# for snapshots only
# BuildRequires: libtool, autoconf, automake
%if %{with python2}
BuildRequires: python2-devel, swig
%endif
@ -155,13 +149,13 @@ This package contains documentation for the ldns library
pushd %{pkgname}
%autopatch -p2
# To built svn snapshots
%if 0%{snapshot}
rm config.guess config.sub ltmain.sh
aclocal
libtoolize -c --install
autoreconf --install
%endif
rm -f config.guess config.sub ltmain.sh
# Use ax_python_devel from autoconf-archive
cp -p %{_datadir}/aclocal/{ax_python_devel,ax_pkg_swig}.m4 .
aclocal
libtoolize -c --install
autoreconf --install
# fixup .pc file
sed -i "s/@includedir@/@includedir@\/ldns/" packaging/libldns.pc.in
@ -354,6 +348,9 @@ rm -rf doc/man
%doc doc
%changelog
* Tue Jan 03 2023 Petr Menšík <pemensik@redhat.com> - 1.8.3-3
- Use recent autoconf python detection (#2155003)
* Fri Sep 30 2022 Petr Menšík <pemensik@redhat.com> - 1.8.3-2
- Update License tag to SPDX identifier