Change with_python to with_python2
This commit is contained in:
parent
2febb22986
commit
a5fd74d24b
24
ldns.spec
24
ldns.spec
@ -1,5 +1,5 @@
|
||||
%global _hardened_build 1
|
||||
%{?!with_python: %global with_python 1}
|
||||
%{?!with_python2: %global with_python2 1}
|
||||
%{?!with_python3: %global with_python3 1}
|
||||
%{?!with_perl: %global with_perl 1}
|
||||
%{?!with_ecdsa: %global with_ecdsa 1}
|
||||
@ -9,7 +9,7 @@
|
||||
%{?!disable_dane: %global disable_dane 0}
|
||||
%{?!snapshot: %global snapshot 0}
|
||||
|
||||
%if %{with_python}
|
||||
%if %{with_python2}
|
||||
%{!?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)")}
|
||||
%{?filter_setup:
|
||||
@ -58,7 +58,7 @@ BuildRequires: doxygen
|
||||
|
||||
# for snapshots only
|
||||
# BuildRequires: libtool, autoconf, automake
|
||||
%if %{with_python}
|
||||
%if %{with_python2}
|
||||
BuildRequires: python2-devel, swig
|
||||
%endif
|
||||
%if %{with_python3}
|
||||
@ -96,7 +96,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Collection of tools to get, check or alter DNS(SEC) data.
|
||||
|
||||
|
||||
%if %{with_python}
|
||||
%if %{with_python2}
|
||||
%package -n python2-ldns
|
||||
Summary: Python2 extensions for ldns
|
||||
Group: Applications/System
|
||||
@ -144,12 +144,12 @@ This package contains documentation for the ldns library
|
||||
|
||||
%setup -qcn %{pkgname}
|
||||
|
||||
%if 0%{with_python}
|
||||
%if 0%{with_python2}
|
||||
mv %{pkgname} %{pkgname}_python2
|
||||
pushd %{pkgname}_python2
|
||||
%else
|
||||
pushd %{pkgname}
|
||||
%endif # with_python
|
||||
%endif # with_python2
|
||||
|
||||
%patch1 -p2 -b .multilib
|
||||
%patch2 -p1 -b .limit
|
||||
@ -207,17 +207,17 @@ export CFLAGS CXXFLAGS LDFLAGS
|
||||
--disable-static \\\
|
||||
|
||||
|
||||
%if 0%{with_python}
|
||||
%if 0%{with_python2}
|
||||
pushd %{pkgname}_python2
|
||||
%else
|
||||
pushd %{pkgname}
|
||||
%endif # with_python
|
||||
%endif # with_python2
|
||||
|
||||
%configure \
|
||||
%{common_args} \
|
||||
--with-examples \
|
||||
--with-drill \
|
||||
%if %{with_python}
|
||||
%if %{with_python2}
|
||||
--with-pyldns PYTHON_VERSION=2
|
||||
%endif
|
||||
|
||||
@ -252,7 +252,7 @@ popd
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if 0%{with_python}
|
||||
%if 0%{with_python2}
|
||||
pushd %{pkgname}_python2
|
||||
%else
|
||||
pushd %{pkgname}
|
||||
@ -263,7 +263,7 @@ make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-doc
|
||||
|
||||
# remove .la files
|
||||
rm -rf %{buildroot}%{_libdir}/*.la
|
||||
%if 0%{with_python}
|
||||
%if 0%{with_python2}
|
||||
rm -rf %{buildroot}%{python2_sitearch}/*.la
|
||||
%endif
|
||||
|
||||
@ -316,7 +316,7 @@ rm -rf doc/man
|
||||
%{_includedir}/ldns/*.h
|
||||
%{_mandir}/man3/*.3.gz
|
||||
|
||||
%if %{with_python}
|
||||
%if %{with_python2}
|
||||
%files -n python2-ldns
|
||||
%doc %{pkgname}_python2/contrib/python/Changelog README.ldnsx
|
||||
%license LICENSE.ldnsx
|
||||
|
||||
Loading…
Reference in New Issue
Block a user