]> err.no Git - sope/commitdiff
deal with linker cache in %post/%postun of sope-core
authorfrank <frank@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 17 Jan 2005 13:09:33 +0000 (13:09 +0000)
committerfrank <frank@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 17 Jan 2005 13:09:33 +0000 (13:09 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@521 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

maintenance/sope.spec

index ba2c32726ef9896d2a933287162398732a3cf1af..562ecb2a2f41d2b699e120f0662a7f0ba02a2409 100644 (file)
@@ -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