From: frank Date: Mon, 17 Jan 2005 13:09:33 +0000 (+0000) Subject: deal with linker cache in %post/%postun of sope-core X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e8a8ff0d56ed3057c305a7ce21bad23aacacbab;p=sope deal with linker cache in %post/%postun of sope-core git-svn-id: http://svn.opengroupware.org/SOPE/trunk@521 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/maintenance/sope.spec b/maintenance/sope.spec index ba2c3272..562ecb2a 100644 --- a/maintenance/sope.spec +++ b/maintenance/sope.spec @@ -297,8 +297,24 @@ rm -f ${RPM_BUILD_ROOT}%{prefix}/bin/rssparse rm -f ${RPM_BUILD_ROOT}%{prefix}/bin/testqp # ****************************** post ********************************* +%post core +if [ $1 = 1 ]; then + if [ -d %{_sysconfdir}/ld.so.conf.d ]; then + echo "%{prefix}/lib" > %{_sysconfdir}/ld.so.conf.d/sope%{sope_major_version}%{sope_minor_version}.conf + elif [ ! "`grep '%{prefix}/lib' %{_sysconfdir}/ld.so.conf`" ]; then + echo "%{prefix}/lib" >> %{_sysconfdir}/ld.so.conf + fi + /sbin/ldconfig +fi # ****************************** postun ********************************* +%postun core +if [ $1 = 0 ]; then + if [ -e %{_sysconfdir}/ld.so.conf.d/sope%{sope_major_version}%{sope_minor_version}.conf ]; then + rm -f %{_sysconfdir}/ld.so.conf.d/sope%{sope_major_version}%{sope_minor_version}.conf + fi + /sbin/ldconfig +fi # ****************************** clean ******************************** %clean