Selaa lähdekoodia

libpwquality-1.4.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11942 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 6 vuotta sitten
vanhempi
commit
402c50860c
1 muutettua tiedostoa jossa 54 lisäystä ja 7 poistoa
  1. 54 7
      lib/libp/libpwquality/libpwquality-vl.spec

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

@@ -1,12 +1,13 @@
 Summary: A library for password generation and password quality checking
 Name: libpwquality
-Version: 1.3.0
+Version: 1.4.0
 Release: 1%{?_dist_release}
 # The package is BSD licensed with option to relicense as GPLv2+
 # - this option is redundant as the BSD license allows that anyway.
 License: BSD or GPLv2+
 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 _secconfdir %{_sysconfdir}/security
@@ -17,11 +18,14 @@ BuildRequires: cracklib
 BuildRequires: gettext
 BuildRequires: pam-devel
 BuildRequires: python-devel
+BuildRequires: python-rpm-macros
+BuildRequires: python3-devel
+BuildRequires: python3-rpm-macros
 
 URL: https://fedorahosted.org/libpwquality/
 
 # 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
 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
 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
 %setup -q
+%patch1 -p1 -b .covscan
+
+rm -rf %{py3dir}
+cp -a . %{py3dir}
 
 %build
 %configure \
-	--with-securedir=/%{_lib}/security \
+	--with-securedir=%{_moduledir} \
 	--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
 
 make %{?_smp_mflags}
+popd
 
 %install
 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}
 mv libpwquality.so.* $RPM_BUILD_ROOT/%{_lib}/
 ln -sf ../../%{_lib}/libpwquality.so.*.* libpwquality.so
 popd
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.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
 
@@ -87,14 +122,15 @@ rm -f $RPM_BUILD_ROOT%{python_sitearch}/pwquality-1.3.0-py2.7.egg-info
 
 %files -f libpwquality.lang
 %defattr(-,root,root,-)
-%doc COPYING README NEWS AUTHORS
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc README NEWS AUTHORS
 %{_bindir}/pwmake
 %{_bindir}/pwscore
 %{_moduledir}/pam_pwquality.so
 /%{_lib}/libpwquality.so.*
 %config(noreplace) %{_secconfdir}/pwquality.conf
 %{_mandir}/man1/*
-%{_mandir}/man3/*
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 
@@ -103,12 +139,23 @@ rm -f $RPM_BUILD_ROOT%{python_sitearch}/pwquality-1.3.0-py2.7.egg-info
 %{_includedir}/pwquality.h
 %{_libdir}/libpwquality.so
 %{_libdir}/pkgconfig/*.pc
+%{_mandir}/man3/*
 
 %files -n python-pwquality
 %defattr(-,root,root,-)
 %{python_sitearch}/pwquality.so
+%{python_sitearch}/*.egg-info
+
+%files -n python3-pwquality
+%defattr(-,root,root,-)
+%{python3_sitearch}/*.so
+%{python3_sitearch}/*.egg-info
 
 %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
 - new upstream release