diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec index e49017f..29749fd 100644 --- a/nss-pam-ldapd.spec +++ b/nss-pam-ldapd.spec @@ -49,7 +49,9 @@ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Requires(post): systemd-sysv +Conflicts: systemd < 38 %endif +Conflicts: filesystem < 3 %description The nss-pam-ldapd daemon, nslcd, uses a directory server to look up name @@ -63,7 +65,7 @@ nsswitch module. autoreconf -f -i %build -%configure --libdir=/%{_lib} --disable-pam +%configure --libdir=%{_libdir} --disable-pam make %{?_smp_mflags} %check @@ -72,34 +74,21 @@ make check %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/{%{_initddir},%{_libdir},lib/systemd/system} +mkdir -p $RPM_BUILD_ROOT/{%{_initddir},%{_libdir},%{_unitdir}} %if %{sysvinit} install -p -m755 %{SOURCE2} $RPM_BUILD_ROOT/%{_initddir}/nslcd %endif %if %{systemd} -install -p -m755 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/ -%endif -%if 0%{?fedora} > 13 -# Follow glibc's convention and provide a .so symlink so that people who know -# what to expect can link directly with the module. -if test %{_libdir} != /%{_lib} ; then - touch $RPM_BUILD_ROOT/rootfile - relroot=.. - while ! test -r $RPM_BUILD_ROOT/%{_libdir}/$relroot/rootfile ; do - relroot=../$relroot - done - ln -s $relroot/%{_lib}/libnss_ldap.so.2 \ - $RPM_BUILD_ROOT/%{_libdir}/libnss_ldap.so - rm $RPM_BUILD_ROOT/rootfile -fi +install -p -m755 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir} %endif +ln -sf libnss_ldap.so.2 $RPM_BUILD_ROOT%{_libdir}/libnss_ldap.so sed -i -e 's,^uid.*,uid nslcd,g' -e 's,^gid.*,gid ldap,g' \ $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf touch -r nslcd.conf $RPM_BUILD_ROOT/%{_sysconfdir}/nslcd.conf mkdir -p -m 0755 $RPM_BUILD_ROOT/var/run/nslcd %if %{tmpfiles} -mkdir -p -m 0755 $RPM_BUILD_ROOT/etc/tmpfiles.d -install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}.conf +mkdir -p -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d +install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf %endif %clean @@ -109,17 +98,17 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING HACKING NEWS README TODO %{_sbindir}/* -/%{_lib}/*.so.* +%{_libdir}/*.so.* %{_mandir}/*/* %attr(0600,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/nslcd.conf %if %{tmpfiles} -%attr(0644,root,root) %config(noreplace) /etc/tmpfiles.d/%{name}.conf +%attr(0644,root,root) %{_prefix}/lib/tmpfiles.d/%{name}.conf %endif %if %{sysvinit} %attr(0755,root,root) %{_initddir}/nslcd %endif %if %{systemd} -%config(noreplace) /lib/systemd/system/* +%{_unitdir}/* %endif %attr(0755,nslcd,root) /var/run/nslcd %if 0%{?fedora} > 13 || 0%{?rhel} > 5 @@ -259,6 +248,11 @@ exit 0 %endif %changelog +* Tue Nov 22 2011 Kay Sievers +- move lib to /usr/lib, /lib is only a symlink +- install tmpfiles in /lib not in /etc, /etc is reserved for the local admin +- remove %config from systemd unit in /usr, /usr can not be local config + * Fri Sep 23 2011 Jakub Hrozek 0.7.14-1 - new upstream release 0.7.14 - obsoletes nss-pam-ldapd-0.7.x-buffers.patch