- Do not call always ldconfig

- Use PYTHON=%__pythonX macro, can support different binary than pythonX
- Include gcc and make build dependencies
- Remove python_site*, all recent versions support it
This commit is contained in:
Petr Menšík 2018-07-09 20:34:43 +02:00
parent 1d66343b54
commit 48a3e96673

View File

@ -20,9 +20,7 @@
%{?!snapshot: %global snapshot 0}
%if %{with python2}%{with python3}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%if %{with python2} || %{with python3}
%{?filter_setup:
%global _ldns_internal_filter /^_ldns[.]so.*/d;
%filter_from_requires %{_ldns_internal_filter}
@ -41,7 +39,7 @@
Summary: Low-level DNS(SEC) library with API
Name: ldns
Version: 1.7.0
Release: 19%{?dist}
Release: 20%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
@ -58,6 +56,7 @@ BuildRequires: autoconf
BuildRequires: automake
%endif
BuildRequires: gcc, make
BuildRequires: libpcap-devel
%if %{with dane_ta}
BuildRequires: openssl-devel >= 1.1.0
@ -233,7 +232,7 @@ pushd %{pkgname}
--with-examples \
--with-drill \
%if %{with python3}
--with-pyldns PYTHON_VERSION=3
--with-pyldns PYTHON=%{__python3}
%endif
make %{?_smp_mflags}
@ -256,7 +255,7 @@ popd
pushd %{pkgname}_python2
%configure \
%{common_args} \
--with-pyldns PYTHON_VERSION=2
--with-pyldns PYTHON=%{__python2}
make %{?_smp_mflags}
popd
@ -305,9 +304,7 @@ rm doc/doxyparse.pl
# remove double set of man pages
rm -rf doc/man
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
%doc README
@ -356,6 +353,9 @@ rm -rf doc/man
%doc doc
%changelog
* Tue Jul 10 2018 Petr Menšík <pemensik@redhat.com> - 1.7.0-20
- Add all depends, spec cleanup, use full python interpreter
* Tue Jul 03 2018 Petr Pisar <ppisar@redhat.com> - 1.7.0-19
- Perl 5.28 rebuild