Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 8d1b49872d0a19bd57654d7326747b72 > scriptlet

openoffice.org-common-3.0-1.1mdv2009.0.i586.rpm

PREUN

/bin/sh

# Remove pdfimport extension
if [ $1 -eq 0 ];then
	idpdfimport=$(unopkg3.0 list --shared 2> /dev/null | sed -ne 's/^Identifier: \(com.sun.star.PDFImport-linux.*\)/\1/p');
	if [ "z$idpdfimport" != "z" ]; then
		unopkg3.0 remove --shared $idpdfimport 2> /dev/null
		#clean footprint cache
		unopkg3.0 list --shared &> /dev/null
	fi
fi

POSTIN

/bin/sh
# <mrl> Bogus versioning in previous alternatives setup forces us to do this
# We can safelly remove it, as we are obsoleting that version anyway.
/usr/sbin/update-alternatives --remove ooffice /usr/bin/ooffice2.1 || :
# We changed the master name here.
/usr/sbin/update-alternatives --remove ooffice /usr/bin/ooffice2.3 || :
/usr/sbin/update-alternatives \
	--install /usr/bin/soffice soffice   /usr/bin/ooffice3.0 24 \
	--slave /usr/bin/ooffice   ooffice   /usr/bin/ooffice3.0 \
	--slave /usr/bin/oowriter  oowriter  /usr/bin/oowriter3.0 \
	--slave /usr/bin/oobase    oobase    /usr/bin/oobase3.0 \
	--slave /usr/bin/oodraw    oodraw    /usr/bin/oodraw3.0 \
	--slave /usr/bin/ooimpress ooimpress /usr/bin/ooimpress3.0 \
	--slave /usr/bin/oocalc    oocalc    /usr/bin/oocalc3.0 \
	--slave /usr/bin/ootool    ootool    /usr/bin/ootool3.0 \
	--slave /usr/bin/ooweb     ooweb     /usr/bin/ooweb3.0
[ -e /usr/bin/soffice ] || /usr/sbin/update-alternatives --auto soffice

# Dev300 without bootstraptc no interface language can be determinated
# BrOffice support %post
# for i in \
#    /usr/lib/ooo-3.0/program/bootstraprc \
#    /usr/lib/ooo-3.0/program/versionrc \
#    /usr/lib/ooo-3.0/basis3.0/share/registry/data/org/openoffice/Setup.xcu
# do
#    if [ -f "$i" ]; then
#        rm -f "$i"
#    fi
# done

#dev300: including basis3.0 before program
# alternatives names follows oobr_<filename> mark, making it explicit.
 /usr/sbin/update-alternatives \
	--install /usr/lib/ooo-3.0/program/bootstraprc oobr_bootstraprc3.0 \
		/usr/lib/ooo-3.0/program/bootstraprc.ooo 1 \
	--slave /usr/lib/ooo-3.0/program/versionrc oobr_versionrc3.0 \
		/usr/lib/ooo-3.0/program/versionrc.ooo \
	--slave /usr/lib/ooo-3.0/basis3.0/share/registry/data/org/openoffice/Setup.xcu oobr_Setup.xcu3.0 \
		/usr/lib/ooo-3.0/basis3.0/share/registry/data/org/openoffice/Setup.xcu.ooo
# Always do this configuration, as the switch should be transparent.
/usr/sbin/update-alternatives --auto oobr_bootstraprc
# End of BrOffice support %post


  
# Remove ooobuildtime.log misplaced file
if [ -f /ooobuildtime.log ]; then
      mkdir -p /tmp/ooo.tmp.mdv.rc2/
      mv /ooobuildtime.log /tmp/ooo.tmp.mdv.rc2/
      rm -r /tmp/ooo.tmp.mdv.rc2/
fi

POSTUN

/bin/sh
if [ ! -e "/usr/bin/ooffice3.0" ]; then
        /usr/sbin/update-alternatives --remove soffice /usr/bin/ooffice3.0
fi

# BrOffice support %postun common
 if [ ! -e "/usr/lib/ooo-3.0/program/bootstraprc.ooo" ]; then
        /usr/sbin/update-alternatives --remove oobr_bootstraprc3.0 /usr/lib/ooo-3.0/program/bootstraprc.ooo
 fi
# End of BrOffice support %postun common