-# (See comment above, at end of "%install" section.)
-
-verbose=0
-
-overwrite_links() {
- dir="$1"
- oname="$2"
- nname="$3"
-
- # only do this if the file we're making a link *to* exists
- # (i.e., was present in this rpm.)
- #
- if [ -f "$dir/$nname" ]; then
-
- # backup or delete the old version, if any.
- #
- existed=0
- if [ -f "$dir/$oname" ]; then
- existed=1
- if [ -f "$dir/$oname.rpmsave" ]; then
- rm -f "$dir/$oname"
- if [ $verbose -gt 1 ]; then
- echo "$dir/$oname.rpmsave already exists" >&2
- fi
- else
- mv "$dir/$oname" "$dir/$oname.rpmsave"
- if [ $verbose -gt 1 ]; then
- echo "saved $dir/$oname as $oname.rpmsave" >&2
- fi
- fi
- fi
-
- # install a relative symlink to the new name.
- #
- ln -s "$nname" "$dir/$oname"
- if [ $verbose -ge 1 ]; then
- if [ $existed = 1 ] ; then
- echo "replaced $dir/$oname" >&2
- else
- echo "created $dir/$oname" >&2
- fi
- fi
- fi
-}
-
-CCDIR=%{gnome_ccdir}
-PADIR=%{gnome_paneldir}
-CADIR=%{gnome_prefix}/bin
-DESKF=screensaver-properties.desktop
-CAPLT=screensaver-properties-capplet
-
-overwrite_links $CCDIR $DESKF x$DESKF
-overwrite_links $PADIR $DESKF x$DESKF
-overwrite_links $CADIR $CAPLT x$CAPLT