libpwquality/libpwquality.spec

131 lines
3.8 KiB
RPMSpec

#
# 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 _moduledir /%{_lib}/security
%define _secconfdir %{_sysconfdir}/security
Name: libpwquality
Version: 1.1.0
Release: 0
Summary: Library for password quality checking and generating random passwords
License: BSD-3-Clause or GPL-2.0
Group: System/Base
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
BuildRequires: pkg-config
BuildRequires: python-devel
Requires: cracklib-dict-full >= 2.8
Requires: pam
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.
This library uses the cracklib and cracklib dictionaries
to perform some of the checks.
%package devel
Summary: Files needed for developing PAM-aware applications and modules for PAM
Group: Development/Libraries/Other
Requires: libpwquality = %{version}
Requires: pkg-config
%description devel
libpwquality is a library for password quality checks and generation
of random passwords that pass the checks.
This library uses the cracklib and cracklib dictionaries
to perform some of the checks.
This package provides files needed for development of applications
using the libpwquality library.
See the pwquality.h header file for the API.
%package -n python-pwquality
Summary: Python bindings for the libpwquality library
Group: System/Libraries
Requires: libpwquality = %{version}
%description -n python-pwquality
libpwquality is a library for password quality checks and generation
of random passwords that pass the checks.
This library uses the cracklib and cracklib dictionaries
to perform some of the checks.
This package 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
%build
%configure \
--with-securedir=/%{_lib}/security \
--with-pythonsitedir=%{python_sitearch} \
--disable-static
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
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
%find_lang %{name} %{?no_lang_C}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files lang -f libpwquality.lang
%files
%defattr(-,root,root)
%doc COPYING README NEWS AUTHORS
%{_bindir}/pwmake
%{_bindir}/pwscore
%{_moduledir}/pam_pwquality.so
/%{_lib}/libpwquality.so.*
%config(noreplace) %{_secconfdir}/pwquality.conf
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%files devel
%defattr(-,root,root)
%{_includedir}/pwquality.h
%{_libdir}/libpwquality.so
%{_libdir}/pkgconfig/*.pc
%files -n python-pwquality
%defattr(-,root,root)
%{python_sitearch}/pwquality.so
%changelog