]> git.pld-linux.org Git - packages/cracklib.git/blobdiff - cracklib.spec
- updated to 2.9.11
[packages/cracklib.git] / cracklib.spec
index bf60f2106adca1cc92bebba6196c165b86e36423..629d50deed55c2fef925bc7198d35effeca303da 100644 (file)
@@ -1,3 +1,10 @@
+%bcond_with    python2 # Don't build python 2 bindings
+%bcond_without python3 # Don't build python 3 bindings
+
+%if %{with python3}
+%undefine with_python2
+%endif
+
 Summary:       Password checking library
 Summary(es.UTF-8):     Biblioteca de chequeo de contraseñas
 Summary(fr.UTF-8):     Bibliothèque de vérification de mots de passe
@@ -7,20 +14,23 @@ Summary(ru.UTF-8):   Библиотека проверки паролей
 Summary(tr.UTF-8):     Parola denetim kitaplığı
 Summary(uk.UTF-8):     Бібліотека перевірки паролів
 Name:          cracklib
-Version:       2.9.6
+Version:       2.9.11
 Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
 #Source0Download: https://github.com/cracklib/cracklib/releases
-Source0:       https://github.com/cracklib/cracklib/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: c52f463585d85924b28cdc1e373ae06d
-# for manuals (note: update when available)
-Source1:       ftp://ftp.debian.org/debian/pool/main/c/cracklib2/%{name}2_2.9.2-1.debian.tar.xz
-# Source1-md5: 4bd9ee74f1d6dc2328abfd9e937ed821
+Source0:       https://github.com/cracklib/cracklib/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: a6dfb1766aab43a54e1cbd78abf0a20a
+# for additional manuals (note: update when available)
+Source1:       http://ftp.debian.org/debian/pool/main/c/cracklib2/%{name}2_2.9.6-5.debian.tar.xz
+# Source1-md5: 8aebaa23809f0cbccc84b56ee54e4325
+Patch0:                %{name}-python3.patch
 URL:           https://github.com/cracklib/cracklib
 BuildRequires: gettext-tools >= 0.17
-BuildRequires: python-devel
-BuildRequires: python-modules
+%{?with_python2:BuildRequires: python-devel}
+%{?with_python2:BuildRequires: python-modules}
+%{?with_python3:BuildRequires: python3-devel}
+%{?with_python3:BuildRequires: python3-modules}
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 BuildRequires: tar >= 1:1.22
@@ -158,10 +168,28 @@ Python binding for cracklib.
 %description -n python-cracklib -l pl.UTF-8
 Wiązanie Pythona do crackliba.
 
+%package -n python3-cracklib
+Summary:       Python binding for cracklib
+Summary(pl.UTF-8):     Wiązanie Pythona do crackliba
+Group:         Libraries/Python
+Requires:      %{name} = %{version}-%{release}
+%pyrequires_eq python3-libs
+
+%description -n python3-cracklib
+Python binding for cracklib.
+
+%description -n python3-cracklib -l pl.UTF-8
+Wiązanie Pythona do crackliba.
+
 %prep
 %setup -q -a1
+%{?with_python3:%patch0 -p1}
 
 %build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
        --with-default-dict=%{_datadir}/dict/cracklib_dict
 %{__make}
@@ -169,14 +197,11 @@ Wiązanie Pythona do crackliba.
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir},%{_includedir},%{_datadir}/dict}
+
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_mandir}/man{3,8}
-cp -p debian/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
-cp -p debian/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
-# debian specific
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/update-cracklib.8*
+cp -p debian/create-cracklib-dict.8 $RPM_BUILD_ROOT%{_mandir}/man8
 
 chmod 755 util/cracklib-format
 
@@ -184,15 +209,21 @@ util/cracklib-format $RPM_BUILD_ROOT%{_datadir}/%{name}/cracklib-small | \
 util/cracklib-packer $RPM_BUILD_ROOT%{_datadir}/dict/cracklib-small
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/cracklib-small
 
+%if %{with python2}
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/test_cracklib.py*
 %py_postclean
+%endif
+
+%if %{with python3}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/test_cracklib.py*
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/__pycache__/test_cracklib.*.py*
+%endif
 
 # already in file(1) database
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/cracklib.magic
 
-%{__mv} $RPM_BUILD_ROOT%{_localedir}/{sl_SI,sl}
-
 %find_lang %{name}
 
 %clean
@@ -216,6 +247,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/FascistCheck.3*
 %{_mandir}/man8/cracklib-check.8*
 %{_mandir}/man8/cracklib-format.8*
+%{_mandir}/man8/cracklib-update.8*
 %{_mandir}/man8/create-cracklib-dict.8*
 %{_libdir}/libcrack.la
 %{_includedir}/crack.h
@@ -225,7 +257,17 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libcrack.a
 
+%if %{with python2}
 %files -n python-cracklib
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/_cracklib.so
 %{py_sitescriptdir}/cracklib.py[co]
+%endif
+
+%if %{with python3}
+%files -n python3-cracklib
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_cracklib.so
+%{py3_sitescriptdir}/cracklib.py
+%{py3_sitescriptdir}/__pycache__/cracklib.*.py[co]
+%endif
This page took 0.077015 seconds and 4 git commands to generate.