Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > main-release > by-pkgid > 02a80cc8036a66c296a1858fb11961d3 > scriptlet

openoffice.org64-common-3.0.1-5mdv2009.1.x86_64.rpm

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.1_64 25 \
	--slave /usr/bin/ooffice   ooffice   /usr/bin/ooffice3.0.1_64 \
	--slave /usr/bin/oowriter  oowriter  /usr/bin/oowriter3.0.1_64 \
	--slave /usr/bin/oobase    oobase    /usr/bin/oobase3.0.1_64 \
	--slave /usr/bin/oodraw    oodraw    /usr/bin/oodraw3.0.1_64 \
	--slave /usr/bin/ooimpress ooimpress /usr/bin/ooimpress3.0.1_64 \
	--slave /usr/bin/oocalc    oocalc    /usr/bin/oocalc3.0.1_64 \
	--slave /usr/bin/ootool    ootool    /usr/bin/ootool3.0.1_64 \
	--slave /usr/bin/ooweb     ooweb     /usr/bin/ooweb3.0.1_64
[ -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/lib64/ooo-3.0.1_64/program/bootstraprc \
#    /usr/lib64/ooo-3.0.1_64/program/versionrc \
#    /usr/lib64/ooo-3.0.1_64/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/lib64/ooo-3.0.1_64/program/bootstraprc oobr_bootstraprc3.0.1_64 \
		/usr/lib64/ooo-3.0.1_64/program/bootstraprc.ooo 1 \
	--slave /usr/lib64/ooo-3.0.1_64/program/versionrc oobr_versionrc3.0.1_64 \
		/usr/lib64/ooo-3.0.1_64/program/versionrc.ooo \
	--slave /usr/lib64/ooo-3.0.1_64/basis3.0/share/registry/data/org/openoffice/Setup.xcu oobr_Setup.xcu3.0.1_64 \
		/usr/lib64/ooo-3.0.1_64/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.1_64" ]; then
        /usr/sbin/update-alternatives --remove soffice /usr/bin/ooffice3.0.1_64
fi

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