move library and pam module to /usr

This commit is contained in:
Tomas Mraz 2013-07-11 10:13:15 +02:00
parent a6887ceafa
commit 8b6126a639

View File

@ -1,7 +1,7 @@
Summary: A library for password generation and password quality checking
Name: libpwquality
Version: 1.2.2
Release: 2%{?dist}
Release: 3%{?dist}
# 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+
@ -9,7 +9,8 @@ Group: System Environment/Base
Source0: http://fedorahosted.org/releases/l/i/libpwquality/libpwquality-%{version}.tar.bz2
Patch1: libpwquality-1.2.2-empty-user.patch
%global _moduledir /%{_lib}/security
%global _pwqlibdir %{_libdir}
%global _moduledir %{_libdir}/security
%global _secconfdir %{_sysconfdir}/security
Requires: cracklib-dicts >= 2.8
@ -58,7 +59,7 @@ pronounceable passwords from Python applications.
%build
%configure \
--with-securedir=/%{_lib}/security \
--with-securedir=%{_moduledir} \
--with-pythonsitedir=%{python_sitearch} \
--disable-static
@ -67,10 +68,12 @@ make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%if "%{_pwqlibdir}" != "%{_libdir}"
pushd $RPM_BUILD_ROOT%{_libdir}
mv libpwquality.so.* $RPM_BUILD_ROOT/%{_lib}/
ln -sf ../../%{_lib}/libpwquality.so.*.* libpwquality.so
mv libpwquality.so.* $RPM_BUILD_ROOT%{_pwqlibdir}
ln -sf %{_pwqlibdir}/libpwquality.so.*.* libpwquality.so
popd
%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
@ -89,7 +92,7 @@ rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
%{_bindir}/pwmake
%{_bindir}/pwscore
%{_moduledir}/pam_pwquality.so
/%{_lib}/libpwquality.so.*
%{_pwqlibdir}/libpwquality.so.*
%config(noreplace) %{_secconfdir}/pwquality.conf
%{_mandir}/man1/*
%{_mandir}/man5/*
@ -106,6 +109,9 @@ rm -f $RPM_BUILD_ROOT%{_moduledir}/*.la
%{python_sitearch}/pwquality.so
%changelog
* Thu Jul 11 2013 Tomas Mraz <tmraz@redhat.com> 1.2.2-3
- move library and pam module to /usr
* Mon Jul 8 2013 Tomas Mraz <tmraz@redhat.com> 1.2.2-2
- treat empty user or old password as NULL