Fixed, tidied, tested

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8935 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2001-01-30 15:55:51 +00:00
parent 5ba6b17202
commit 6f07550ada

View file

@ -1,35 +1,44 @@
%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
if [ $1 = 1 ]; then
# if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
# . %{gs_root}/Makefiles/GNUstep.sh
# fi
#==============================================================
# Add lines for gdomap into /etc/services, if not already there
#==============================================================
grep -q '^gdomap' /etc/services \
|| (echo "gdomap 538/tcp # GNUstep distributed objects" >> /etc/services \
&& echo "gdomap 538/udp # GNUstep distributed objects" >> /etc/services)
#
# Need to add paths to ld.so.conf in gnustep-make if we want to do this
#
#%ifos Linux
#/sbin/ldconfig
#%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
# if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
# . %{gs_root}/Makefiles/GNUstep.sh
# fi
#=========================================
# Remove lines for gdomap in /etc/services
#=========================================
mv -f /etc/services /etc/services.orig
grep -v "^gdomap 538" /etc/services.orig > /etc/services
rm -f /etc/services.orig
#
# Need to add paths to ld.so.conf in gnustep-make if we want to do this
#
#%ifos Linux
#/sbin/ldconfig
#%endif
fi