[packages/ldns] - updated to 1.9.0, added python3 module
qboosh
qboosh at pld-linux.org
Sun Jun 7 14:53:28 CEST 2026
commit 0fb779b71b00fdec728207a47fc544fb47ea4f4d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jun 7 14:53:45 2026 +0200
- updated to 1.9.0, added python3 module
ldns.spec | 101 +++++++++++++++++++++++++++++++++++++++------------
python-install.patch | 27 +++++++++-----
2 files changed, 95 insertions(+), 33 deletions(-)
---
diff --git a/ldns.spec b/ldns.spec
index 1a2b7fa..5220183 100644
--- a/ldns.spec
+++ b/ldns.spec
@@ -2,21 +2,22 @@
#
# Conditional build:
%bcond_without static_libs # static library
-%bcond_without python # Python modules
+%bcond_without python2 # Python 2.x modules
+%bcond_without python3 # Python 3.x modules
#
Summary: ldns - a library with the aim to simplify DNS programing in C
Summary(pl.UTF-8): ldns - biblioteka mająca na celu uproszczenie programowania DNS w C
Name: ldns
-Version: 1.8.3
+Version: 1.9.0
Release: 1
License: BSD
Group: Libraries
-Source0: http://www.nlnetlabs.nl/downloads/ldns/%{name}-%{version}.tar.gz
-# Source0-md5: 429b93dacb2d6ecc5ed63788b14c38e6
+Source0: https://www.nlnetlabs.nl/downloads/ldns/%{name}-%{version}.tar.gz
+# Source0-md5: 895ccabbeadf67fe72fdf07c6a5e2a1a
Patch0: python-install.patch
Patch1: %{name}-link.patch
-URL: http://www.nlnetlabs.nl/ldns/
-BuildRequires: autoconf >= 2.56
+URL: https://www.nlnetlabs.nl/projects/ldns/about/
+BuildRequires: autoconf >= 2.71
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: libtool >= 2:2
@@ -65,16 +66,28 @@ Static ldns library.
Statyczna biblioteka ldns.
%package -n python-ldns
-Summary: Python interface do ldns library
-Summary(pl.UTF-8): Pythonowy interfejs do biblioteki ldns
+Summary: Python 2 interface do ldns library
+Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki ldns
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
%description -n python-ldns
-Python interface do ldns library.
+Python 2 interface do ldns library.
%description -n python-ldns -l pl.UTF-8
-Pythonowy interfejs do biblioteki ldns.
+Interfejs Pythona 2 do biblioteki ldns.
+
+%package -n python3-ldns
+Summary: Python 3 interface do ldns library
+Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki ldns
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n python3-ldns
+Python 3 interface do ldns library.
+
+%description -n python3-ldns -l pl.UTF-8
+Interfejs Pythona 3 do biblioteki ldns.
%package -n drill
Summary: drill - tool to get all sorts of information out of the DNS(SEC)
@@ -112,16 +125,35 @@ nie będa wspierane.
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
+%define configuredir ..
+%if %{with python2}
+install -d build-py2
+cd build-py2
%configure \
- --with-examples \
+ PYTHON=%{__python} \
+ --enable-gost-anyway \
+ --disable-static \
+ --without-drill \
+ --without-examples \
+ --with-pyldns
+%{__make}
+cd ..
+%endif
+
+install -d build
+cd build
+%configure \
+ PYTHON=%{__python3} \
--enable-gost-anyway \
--enable-static%{!?with_static_libs:=no} \
--with-drill \
- %{?with_python:--with-pyldns}
+ --with-examples \
+ %{?with_python3:--with-pyldns}
%{__make}
+
%{__make} doc
# change symlinks into .so redirects
@@ -135,22 +167,33 @@ done
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%if %{with python2}
+%{__make} -C build-py2 install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libldns.la
-%if %{with python}
+%if %{with python2}
%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_ldns.la
-%if %{with static_libs}
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_ldns.a
-%endif
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%endif
+%if %{with python3}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_ldns.la
+%if %{with static_libs}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_ldns.a
+%endif
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -160,16 +203,16 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc Changelog LICENSE README
-%attr(755,root,root) %{_libdir}/libldns.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libldns.so.3
+%{_libdir}/libldns.so.*.*.*
+%ghost %{_libdir}/libldns.so.3
%files devel
%defattr(644,root,root,755)
%doc doc/{*.html,dns-lib-implementations,function_manpages,ldns_manpages,CodingStyle}
%attr(755,root,root) %{_bindir}/ldns-config
-%attr(755,root,root) %{_libdir}/libldns.so
+%{_libdir}/libldns.so
%{_pkgconfigdir}/ldns.pc
-%{_includedir}/%{name}
+%{_includedir}/ldns
%{_mandir}/man1/ldns-config.1*
%{_mandir}/man3/ldns_*.3*
@@ -179,14 +222,24 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libldns.a
%endif
-%if %{with python}
+%if %{with python2}
%files -n python-ldns
%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/_ldns.so*
+%{py_sitedir}/_ldns.so*
%{py_sitedir}/ldns.py[co]
%{py_sitedir}/ldnsx.py[co]
%endif
+%if %{with python3}
+%files -n python3-ldns
+%defattr(644,root,root,755)
+%{py3_sitedir}/_ldns.so*
+%{py3_sitedir}/ldns.py
+%{py3_sitedir}/ldnsx.py
+%{py3_sitedir}/__pycache__/ldns.cpython-*.pyc
+%{py3_sitedir}/__pycache__/ldnsx.cpython-*.pyc
+%endif
+
%files -n drill
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/drill
diff --git a/python-install.patch b/python-install.patch
index 2c4f6b8..aeb71e3 100644
--- a/python-install.patch
+++ b/python-install.patch
@@ -1,11 +1,20 @@
---- ldns-1.6.17/ax_python_devel.m4~ 2014-01-10 22:04:41.000000000 +0100
-+++ ldns-1.6.17/ax_python_devel.m4 2016-05-05 19:55:38.599100177 +0200
-@@ -253,7 +253,7 @@
- AC_MSG_CHECKING([for Python site-packages path])
- if test -z "$PYTHON_SITE_PKG"; then
- PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
-- print (distutils.sysconfig.get_python_lib(1,0));"`
-+ print (distutils.sysconfig.get_python_lib(1,0,prefix='/usr'));"`
+--- ldns-1.9.0/ax_python_devel.m4.orig 2025-12-04 16:45:51.000000000 +0100
++++ ldns-1.9.0/ax_python_devel.m4 2026-06-07 14:01:23.916771189 +0200
+@@ -312,7 +312,7 @@ print(sitedir)"`
+ else
+ # distutils.sysconfig way
+ PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+- print (sysconfig.get_python_lib(0,0));"`
++ print (sysconfig.get_python_lib(0,0,prefix='/usr'));"`
+ fi
fi
AC_MSG_RESULT([$PYTHON_SITE_PKG])
- AC_SUBST([PYTHON_SITE_PKG])
+@@ -341,7 +341,7 @@ print(sitedir)"`
+ else
+ # distutils.sysconfig way
+ PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
+- print (sysconfig.get_python_lib(1,0));"`
++ print (sysconfig.get_python_lib(1,0,prefix='/usr'));"`
+ fi
+ fi
+ AC_MSG_RESULT([$PYTHON_PLATFORM_SITE_PKG])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ldns.git/commitdiff/0fb779b71b00fdec728207a47fc544fb47ea4f4d
More information about the pld-cvs-commit
mailing list