132 lines
3.3 KiB
RPMSpec
132 lines
3.3 KiB
RPMSpec
%define _moduledir %{_libdir}/security
|
|
%define _secconfdir %{_sysconfdir}/security
|
|
|
|
Name: libpwquality
|
|
Version: 1.4.0
|
|
Release: 11
|
|
Summary: Library for password quality checking and generating random passwords.
|
|
License: BSD or GPLv2+
|
|
URL: https://github.com/libpwquality/libpwquality/
|
|
Source0: https://github.com/libpwquality/libpwquality/releases/download/libpwquality-%{version}/libpwquality-%{version}.tar.bz2
|
|
|
|
#patch from Fedora
|
|
Patch6000: 0006-pam_pwquality-Abort-the-retry-loop-when-user-cancels.patch
|
|
#patch from Fedora
|
|
Patch6001: 0001-Fix-harmless-one-byte-buffer-underflow-on-read.patch
|
|
|
|
Patch9000: modify-pwquality_conf.patch
|
|
Patch9001: fix-password-similarity.patch
|
|
|
|
BuildRequires: gcc cracklib-devel gettext pam-devel
|
|
BuildRequires: python2-devel python3-devel
|
|
|
|
Recommends: cracklib >= 2.8
|
|
Requires: pam
|
|
|
|
%description
|
|
The libpwquality library purpose is to provide common functions for password quality checking and also scoring them based on their apparent randomness.
|
|
The library also provides a function for generating random passwords with good pronounceability.
|
|
The library supports reading and parsing of a configuration file.
|
|
|
|
%package devel
|
|
Summary: Support for development of applications using the libpwquality library
|
|
Requires: libpwquality = %{version}-%{release}
|
|
Requires: pkgconfig
|
|
|
|
%description devel
|
|
Files needed for development of applications using the libpwquality library.
|
|
See the pwquality.h header file for the API.
|
|
|
|
%package -n python2-pwquality
|
|
Summary: Python2 bindings for the libpwquality library
|
|
Requires: libpwquality = %{version}-%{release}
|
|
|
|
%description -n python2-pwquality
|
|
This package provides Python2 bindings for the libpwquality library.
|
|
|
|
%package -n python3-pwquality
|
|
Summary: Python3 bindings for the libpwquality library
|
|
Requires: libpwquality = %{version}-%{release}
|
|
|
|
%description -n python3-pwquality
|
|
This package provides Python3 bindings for the libpwquality library.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
rm -rf %{py3dir}
|
|
cp -a . %{py3dir}
|
|
|
|
%build
|
|
#python2
|
|
%configure --with-securedir=%{_moduledir} \
|
|
--with-pythonsitedir=%{python2_sitearch} \
|
|
--with-python-binary=%{__python2} \
|
|
--disable-static
|
|
|
|
%make_build
|
|
|
|
#python3
|
|
cd %{py3dir}
|
|
%configure --with-securedir=%{_moduledir} \
|
|
--with-pythonsitedir=%{python3_sitearch} \
|
|
--with-python-binary=%{__python3} \
|
|
--disable-static
|
|
|
|
%make_build
|
|
cd -
|
|
|
|
%install
|
|
%make_install
|
|
|
|
cd %{py3dir}
|
|
%make_install -C python
|
|
cd -
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.la
|
|
rm -f %{buildroot}%{_moduledir}/*.la
|
|
|
|
mkdir %{buildroot}%{_secconfdir}/pwquality.conf.d
|
|
|
|
%find_lang libpwquality
|
|
|
|
%check
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
%files -f libpwquality.lang
|
|
%license COPYING
|
|
%doc README NEWS AUTHORS
|
|
%{_bindir}/pwmake
|
|
%{_bindir}/pwscore
|
|
%{_moduledir}/pam_pwquality.so
|
|
%{_libdir}/libpwquality.so.*
|
|
%config(noreplace) %{_secconfdir}/pwquality.conf
|
|
%{_secconfdir}/pwquality.conf.d
|
|
|
|
%files devel
|
|
%{_includedir}/pwquality.h
|
|
%{_libdir}/libpwquality.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files -n python2-pwquality
|
|
%{python2_sitearch}/pwquality.so
|
|
%{python2_sitearch}/*.egg-info
|
|
|
|
%files -n python3-pwquality
|
|
%{python3_sitearch}/*.so
|
|
%{python3_sitearch}/*.egg-info
|
|
|
|
%files help
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man5/*
|
|
%{_mandir}/man3/*
|
|
%{_mandir}/man8/*
|
|
%changelog
|
|
* Wed Sep 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.4.0-11
|
|
- Package init
|