[packages/libpwquality] - disable python buildings, we are building it outside "make" - make python 2.x bindings optional
hawk
hawk at pld-linux.org
Fri Apr 5 03:33:07 CEST 2024
commit 8a81ac5326af143967bbc0b39ad97fed730a18eb
Author: Marcin Krol <hawk at tld-linux.org>
Date: Fri Apr 5 01:43:53 2024 +0200
- disable python buildings, we are building it outside "make"
- make python 2.x bindings optional
libpwquality.spec | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/libpwquality.spec b/libpwquality.spec
index e0cce8e..e291d41 100644
--- a/libpwquality.spec
+++ b/libpwquality.spec
@@ -1,5 +1,6 @@
#
# Conditional build
+%bcond_without python2 # Python 2 module
%bcond_without python3 # Python 3 module
%bcond_without static_libs # static library
@@ -21,7 +22,7 @@ BuildRequires: gettext-tools >= 0.18.2
BuildRequires: libtool
BuildRequires: pam-devel
BuildRequires: pkgconfig
-BuildRequires: python-devel >= 2
+%{?with_python2:BuildRequires: python-devel >= 2}
%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
Suggests: cracklib-dicts >= 2.8
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -108,14 +109,17 @@ Wiązania Pythona 3 do biblioteki libpwquality.
%{__automake}
%configure \
--with-securedir=/%{_lib}/security \
+ --disable-python-bindings \
%{__enable_disable static_libs static}
%{__make}
+%if %{with python2}
cd python
CFLAGS="%{rpmcflags} -fno-strict-aliasing"
%py_build
cd ..
+%endif
%if %{with python3}
cd python
@@ -128,9 +132,11 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%if %{with python2}
cd python
%py_install
cd ..
+%endif
%if %{with python3}
cd python
@@ -182,12 +188,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libpwquality.a
%endif
+%if %{with python2}
%files -n python-pwquality
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/pwquality.so
%if "%{py_ver}" > "2.4"
%{py_sitedir}/pwquality-%{version}-py*.egg-info
%endif
+%endif
%if %{with python3}
%files -n python3-pwquality
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libpwquality.git/commitdiff/8a81ac5326af143967bbc0b39ad97fed730a18eb
More information about the pld-cvs-commit
mailing list