# # spec file for package libpwquality # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define _pammoduledir /%{_lib}/security %define _secconfdir %{_sysconfdir}/security Name: libpwquality Version: 1.2.0 Release: 0 Summary: Library for password quality checking and generating random passwords License: BSD-3-Clause or GPL-2.0+ Group: System/Libraries Url: https://fedorahosted.org/libpwquality/ Source: https://fedorahosted.org/releases/l/i/%{name}/%{name}-%{version}.tar.bz2 BuildRequires: cracklib-devel BuildRequires: gettext-devel BuildRequires: pam-devel # Needed for pkgconfig() Provides BuildRequires: pkg-config BuildRequires: python-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %lang_package %description libpwquality is a library for password quality checks and generation of random passwords that pass the checks. %package -n libpwquality1 Summary: Library for password quality checking and generating random passwords Group: System/Libraries Requires: cracklib-dict-full >= 2.8 Recommends: %{name}-lang # To make lang package installable Provides: %{name} %description -n libpwquality1 libpwquality is a library for password quality checks and generation of random passwords that pass the checks. %package tools Summary: Library for password quality checking -- Tools Group: Productivity/Security %description tools libpwquality is a library for password quality checks and generation of random passwords that pass the checks. This package contains simple tools that use libpwquality. %package devel Summary: Library for password quality checking -- Development Files Group: Development/Libraries/C and C++ Requires: libpwquality1 = %{version} Requires: pkg-config %description devel libpwquality is a library for password quality checks and generation of random passwords that pass the checks. This package provides files needed for development of applications using the libpwquality library. %package -n pam_pwquality Summary: PAM module to disallow weak new passwords Group: System/Libraries Requires: pam %description -n pam_pwquality The pam_pwquality PAM module can be used instead of pam_cracklib to disallow weak new passwords when user's login password is changed. %package -n python-pwquality Summary: Library for password quality checking -- Python bindings Group: Development/Libraries/Python %description -n python-pwquality libpwquality is a library for password quality checks and generation of random passwords that pass the checks. This package provides Python bindings for the libpwquality library. %prep %setup -q %build %configure \ --disable-static \ --with-securedir=%{_pammoduledir} \ --with-pythonsitedir=%{python_sitearch} make %{?_smp_mflags} %install %make_install rm %{buildroot}%{_libdir}/*.la rm %{buildroot}%{_pammoduledir}/*.la %find_lang %{name} %{?no_lang_C} %post -n libpwquality1 -p /sbin/ldconfig %postun -n libpwquality1 -p /sbin/ldconfig %files -n libpwquality1 %defattr(-,root,root) %doc AUTHORS COPYING NEWS README %{_libdir}/libpwquality.so.* %config(noreplace) %{_secconfdir}/pwquality.conf %{_mandir}/man5/pwquality.conf.5%{?ext_man} %files tools %defattr(-,root,root) %{_bindir}/pwmake %{_bindir}/pwscore %{_mandir}/man1/pwmake.1%{?ext_man} %{_mandir}/man1/pwscore.1%{?ext_man} %files devel %defattr(-,root,root) %{_includedir}/pwquality.h %{_libdir}/libpwquality.so %{_libdir}/pkgconfig/pwquality.pc %files -n pam_pwquality %defattr(-,root,root) %{_pammoduledir}/pam_pwquality.so %{_mandir}/man8/pam_pwquality.8%{?ext_man} %files -n python-pwquality %defattr(-,root,root) %{python_sitearch}/pwquality.so %files lang -f libpwquality.lang %changelog