Эх сурвалжийг харах

libpwquality-1.4.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11942 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 6 жил өмнө
parent
commit
402c50860c

+ 54 - 7
lib/libp/libpwquality/libpwquality-vl.spec

@@ -1,12 +1,13 @@
 Summary: A library for password generation and password quality checking
 Summary: A library for password generation and password quality checking
 Name: libpwquality
 Name: libpwquality
-Version: 1.3.0
+Version: 1.4.0
 Release: 1%{?_dist_release}
 Release: 1%{?_dist_release}
 # The package is BSD licensed with option to relicense as GPLv2+
 # The package is BSD licensed with option to relicense as GPLv2+
 # - this option is redundant as the BSD license allows that anyway.
 # - this option is redundant as the BSD license allows that anyway.
 License: BSD or GPLv2+
 License: BSD or GPLv2+
 Group: System Environment/Base
 Group: System Environment/Base
-Source0: http://fedorahosted.org/releases/l/i/libpwquality/libpwquality-%{version}.tar.bz2
+Source0: https://github.com/libpwquality/libpwquality/releases/download/libpwquality-%{version}/libpwquality-%{version}.tar.bz2
+Patch1: libpwquality-1.4.0-covscan.patch
 
 
 %global _moduledir /%{_lib}/security
 %global _moduledir /%{_lib}/security
 %global _secconfdir %{_sysconfdir}/security
 %global _secconfdir %{_sysconfdir}/security
@@ -17,11 +18,14 @@ BuildRequires: cracklib
 BuildRequires: gettext
 BuildRequires: gettext
 BuildRequires: pam-devel
 BuildRequires: pam-devel
 BuildRequires: python-devel
 BuildRequires: python-devel
+BuildRequires: python-rpm-macros
+BuildRequires: python3-devel
+BuildRequires: python3-rpm-macros
 
 
 URL: https://fedorahosted.org/libpwquality/
 URL: https://fedorahosted.org/libpwquality/
 
 
 # we don't want to provide private python extension libs
 # we don't want to provide private python extension libs
-%define __provides_exclude_from ^%{python_sitearch}/.*\.so$.
+%define __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\.so$.
 
 
 Vendor: Project Vine
 Vendor: Project Vine
 Distribution: Vine Linux
 Distribution: Vine Linux
@@ -54,27 +58,58 @@ for the libpwquality library. These bindings can be used
 for easy password quality checking and generation of random
 for easy password quality checking and generation of random
 pronounceable passwords from Python applications.
 pronounceable passwords from Python applications.
 
 
+%package -n python3-pwquality
+Group: Development/Libraries
+Summary: Python bindings for the libpwquality library
+Requires: libpwquality = %{version}-%{release}
+
+%description -n python3-pwquality
+This is pwquality Python module that provides Python bindings
+for the libpwquality library. These bindings can be used
+for easy password quality checking and generation of random
+pronounceable passwords from Python applications.
+
 %prep
 %prep
 %setup -q
 %setup -q
+%patch1 -p1 -b .covscan
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
 
 
 %build
 %build
 %configure \
 %configure \
-	--with-securedir=/%{_lib}/security \
+	--with-securedir=%{_moduledir} \
 	--with-pythonsitedir=%{python_sitearch} \
 	--with-pythonsitedir=%{python_sitearch} \
+	--with-python-binary=%{__python} \
+	--disable-static
+
+make %{?_smp_mflags}
+
+pushd %{py3dir}
+%configure \
+	--with-securedir=%{_moduledir} \
+	--with-pythonsitedir=%{python3_sitearch} \
+	--with-python-binary=%{__python3} \
 	--disable-static
 	--disable-static
 
 
 make %{?_smp_mflags}
 make %{?_smp_mflags}
+popd
 
 
 %install
 %install
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
 
 
+pushd %{py3dir}
+make -C python install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
+popd
+
 pushd $RPM_BUILD_ROOT%{_libdir}
 pushd $RPM_BUILD_ROOT%{_libdir}
 mv libpwquality.so.* $RPM_BUILD_ROOT/%{_lib}/
 mv libpwquality.so.* $RPM_BUILD_ROOT/%{_lib}/
 ln -sf ../../%{_lib}/libpwquality.so.*.* libpwquality.so
 ln -sf ../../%{_lib}/libpwquality.so.*.* libpwquality.so
 popd
 popd
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
 rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
-rm -f $RPM_BUILD_ROOT%{python_sitearch}/pwquality-1.3.0-py2.7.egg-info
+
+mkdir $RPM_BUILD_ROOT%{_secconfdir}/pwquality.conf.d
 
 
 %find_lang libpwquality
 %find_lang libpwquality
 
 
@@ -87,14 +122,15 @@ rm -f $RPM_BUILD_ROOT%{python_sitearch}/pwquality-1.3.0-py2.7.egg-info
 
 
 %files -f libpwquality.lang
 %files -f libpwquality.lang
 %defattr(-,root,root,-)
 %defattr(-,root,root,-)
-%doc COPYING README NEWS AUTHORS
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc README NEWS AUTHORS
 %{_bindir}/pwmake
 %{_bindir}/pwmake
 %{_bindir}/pwscore
 %{_bindir}/pwscore
 %{_moduledir}/pam_pwquality.so
 %{_moduledir}/pam_pwquality.so
 /%{_lib}/libpwquality.so.*
 /%{_lib}/libpwquality.so.*
 %config(noreplace) %{_secconfdir}/pwquality.conf
 %config(noreplace) %{_secconfdir}/pwquality.conf
 %{_mandir}/man1/*
 %{_mandir}/man1/*
-%{_mandir}/man3/*
 %{_mandir}/man5/*
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 %{_mandir}/man8/*
 
 
@@ -103,12 +139,23 @@ rm -f $RPM_BUILD_ROOT%{python_sitearch}/pwquality-1.3.0-py2.7.egg-info
 %{_includedir}/pwquality.h
 %{_includedir}/pwquality.h
 %{_libdir}/libpwquality.so
 %{_libdir}/libpwquality.so
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/pkgconfig/*.pc
+%{_mandir}/man3/*
 
 
 %files -n python-pwquality
 %files -n python-pwquality
 %defattr(-,root,root,-)
 %defattr(-,root,root,-)
 %{python_sitearch}/pwquality.so
 %{python_sitearch}/pwquality.so
+%{python_sitearch}/*.egg-info
+
+%files -n python3-pwquality
+%defattr(-,root,root,-)
+%{python3_sitearch}/*.so
+%{python3_sitearch}/*.egg-info
 
 
 %changelog
 %changelog
+* Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.0-1
+- new upstream release.
+- added python3 support.
+
 * Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.3.0-1
 * Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.3.0-1
 - new upstream release
 - new upstream release