libs-base/gnustep-base.script.spec.in
Adam Fedor 29f1fd43e8 RPM script for installing gdomap
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8817 72102866-910b-0410-8b05-ffd578937521
2001-01-26 22:41:58 +00:00

35 lines
1.1 KiB
RPMSpec

%post
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
. %{gsr}/Makefiles/GNUstep.sh
fi
grep -q '^gdomap' /etc/services || (echo "gdomap 538/tcp # GNUstep distrib objects" >> /etc/services && echo "gdomap 538/udp # GNUstep distrib objects" >> /etc/services)
%ifos Linux
grep -q '%{gsr}/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/gnu-gnu-gnu-xgps' /etc/ld.so.conf || echo "%{gsr}/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/%{libcombo}" >> /etc/ld.so.conf
/sbin/ldconfig
/sbin/chkconfig --add gnustep
%endif
%preun
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
. %{gsr}/Makefiles/GNUstep.sh
fi
if [ $1 = 0 ]; then
/sbin/chkconfig --del gnustep
mv -f /etc/services /etc/services.orig
grep -v "^gdomap 538" /etc/services.orig > /etc/services
rm -f /etc/services.orig
fi
%postun
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
. %{gsr}/Makefiles/GNUstep.sh
fi
if [ $1 = 0 ]; then
%ifos Linux
mv -f /etc/ld.so.conf /etc/ld.so.conf.orig
grep -v "^%{gsr}/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/%{libcombo}$" /etc/ld.so.conf.orig > /etc/ld.so.conf
rm -f /etc/ld.so.conf.orig
/sbin/ldconfig
%endif
fi