From 8b6126a6390e59956653e1e0d6e8eaeac8ac5c8e Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 11 Jul 2013 10:13:15 +0200 Subject: [PATCH] move library and pam module to /usr --- libpwquality.spec | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libpwquality.spec b/libpwquality.spec index 3b6191e..d6eaa05 100644 --- a/libpwquality.spec +++ b/libpwquality.spec @@ -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 1.2.2-3 +- move library and pam module to /usr + * Mon Jul 8 2013 Tomas Mraz 1.2.2-2 - treat empty user or old password as NULL