diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-09-15 16:00:42 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-09-15 16:00:42 +0000 |
commit | 2b5a13988996b3e2b27e64d5b55d1422db243985 (patch) | |
tree | 6e93ac334124f104e91d91742276d1868731d6ca /app-office/openoffice-bin | |
parent | added ebuild for ap-utils, the Wireless Access Point Utilites for Unix (diff) | |
download | gentoo-2-2b5a13988996b3e2b27e64d5b55d1422db243985.tar.gz gentoo-2-2b5a13988996b3e2b27e64d5b55d1422db243985.tar.bz2 gentoo-2-2b5a13988996b3e2b27e64d5b55d1422db243985.zip |
new version
Diffstat (limited to 'app-office/openoffice-bin')
9 files changed, 403 insertions, 274 deletions
diff --git a/app-office/openoffice-bin/ChangeLog b/app-office/openoffice-bin/ChangeLog index 251450f94146..f3321a53af00 100644 --- a/app-office/openoffice-bin/ChangeLog +++ b/app-office/openoffice-bin/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-office/openoffice-bin # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/ChangeLog,v 1.6 2002/09/09 21:17:21 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/ChangeLog,v 1.7 2002/09/15 16:00:42 azarah Exp $ + +*openoffice-bin-1.0.1 (15 Sep 2002) + + 15 Sep 2002; Martin Schlemmer <azarah@gentoo.org> openoffice-bin-1.0.1.ebuild : + New version. Cleanups. Install the Menu shortcuts. *openoffice-bin-1.0.0-r3 (9 Sep 2002) diff --git a/app-office/openoffice-bin/files/1.0.1/ooffice-wrapper b/app-office/openoffice-bin/files/1.0.1/ooffice-wrapper new file mode 100644 index 000000000000..4791ddd4b191 --- /dev/null +++ b/app-office/openoffice-bin/files/1.0.1/ooffice-wrapper @@ -0,0 +1,201 @@ +#!/bin/sh +# +# Wrapper script for openoffice +# +# (C) Peter 'Nidd' Novodvorsky, 2001,2002 +# (C) Martin 'empty' Quinson, 2002. +# Modifications by Chris Halls + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# this string should be exactly as in ~/.sversionrc +OOVERSION="OpenOffice.org <pv>" + +## +## Source system configuration file +## +[ -r /etc/openoffice/openoffice.conf ] && . /etc/openoffice/openoffice.conf + +## +## where does OO live for this user ? +## +OOHOME="" +if [ -e ~/.sversionrc ] && grep -q "$OOVERSION" ~/.sversionrc ; then + # already installed for this user (warning, .sversionrc is DOS encoded) + OOHOME=`grep "^$OOVERSION=" ~/.sversionrc| \ + sed "s|^$OOVERSION=file://||" | \ + xargs echo` + if [ ! -e $OOHOME ] ; then + echo "I'm confused because I can't find OpenOffice's user files." + echo "Your ~/.sversionrc file tells they should be under $OOHOME," + echo "but they are not. Please fix the situation manually." + echo "You may want to edit ~/.sversionrc to indicate where is OO" + echo "installed, or remove it if you did remove your installation" + echo "directory manually (you bad one)." + exit 1 + fi +fi + +## +## Unset SESSION_MANAGER if gnome-session is the session manager +## See http://www.openoffice.org/issues/show_bug.cgi?id=4494 +## +SMPID=`echo $SESSION_MANAGER | sed --quiet "s,local.*/,,p"` +if [ -n "$SMPID" ] && [ -L /proc/"$SMPID"/exe ]; then + SESMGR="`readlink -f /proc/$SMPID/exe`" + if [ "$SESMGR" = "/usr/bin/gnome-session" ]; then + echo "Gnome session manager detected - session management disabled" + unset SESSION_MANAGER + fi +fi + +## +## install OO for this user if needed +## +if [ -z "$OOHOME" ] ; then + if [ -e /etc/openoffice/autoresponse.conf ] && \ + grep -q DESTINATIONPATH /etc/openoffice/autoresponse.conf ; then + # first install + OOHOME=`grep DESTINATIONPATH /etc/openoffice/autoresponse.conf | \ + sed -e 's/DESTINATIONPATH=//' -e "s|<home>|$HOME|"` + + if [ -d "$OOHOME" ]; then + echo "openoffice.org: You have no entry for $OOVERSION in ~/.sversionrc, " + echo "yet the directory $OOHOME exists." + echo "Please remove $OOHOME and try again." + exit 1 + fi + echo "running openoffice.org setup..." + if ! /opt/OpenOffice.org<pv>/program/setup -R:/etc/openoffice/autoresponse.conf ; then + echo "setup failed.. abort" + exit 1 + fi + echo "Setup complete. Running openoffice.org..." + else + echo "openoffice.org: Damnit! I can't find OpenOffice's user files. Did you break" + echo "the /etc/openoffice/autoresponse.conf file manually ?" + echo "This file should contain DESTINATIONPATH" + exit 1 + fi +fi + +## +## If no file is specified on the command line, which application to start? +## The wrapper can be called from several links in /usr/bin +## +if [ $# = 0 ]; then + case `basename $0` in + oocalc) set -- private:factory/scalc;; + oodraw) set -- private:factory/sdraw;; + ooimpress) set -- private:factory/simpress;; + oomath) set -- private:factory/smath;; + oowriter) set -- private:factory/swriter;; + esac +fi + +## +## +## Change the config files to conform to current locale used +## + +# Fix some variable to make the paths shorter in the rest +LINGFILE="$OOHOME/user/config/registry/instance/org/openoffice/Office/Linguistic.xml" +SETUPFILE="$OOHOME/user/config/registry/instance/org/openoffice/Setup.xml" + + +# Search the right locale +OLDLOCALE="" +if [ -e $LINGFILE ] ; then + OLDLOCALE=`grep 'DefaultLocale cfg' $LINGFILE|sed 's/<[^>]*>//g'|sed 's/[[:blank:]]//g'` +fi +if [ -z $OLDLOCALE ]; then OLDLOCALE="en-US"; fi +if [ "x$OLDLOCALE" = "xC" ]; then OLDLOCALE="en-US"; fi + +LOCALE=$LC_ALL +if [ -z $LOCALE ] ; then LOCALE="$LC_MESSAGES"; fi +if [ -z $LOCALE ] ; then LOCALE="$LANG"; fi +if [ -z $LOCALE ] ; then LOCALE="en-US"; fi +if [ "x$LOCALE" = "xC" ] ; then LOCALE="en-US"; fi + +if [ $LOCALE != $OLDLOCALE ] ; then + + # Change instdb.ins + cp $OOHOME/instdb.ins $OOHOME/instdb.ins.$OLDLOCALE + sed "s/>$OLDLOCALE</>$LOCALE</" $OOHOME/instdb.ins.$OLDLOCALE > $OOHOME/instdb.ins + + # Create Linguistic.xml if don't exists + if [ ! -e $LINGFILE.$OLDLOCALE ] ; then + # get a default one, and change en-US to OLDLOCALE inside. I guess this is a noop, but I'm not sure + sed "s/>en-US</>$OLDLOCALE</" \ + < /opt/OpenOffice.org<pv>/share/config/registry/instance/org/openoffice/Office/Linguistic.xml \ + > $LINGFILE.$OLDLOCALE + fi + + # change Linguistic.xml + sed "s/>$OLDLOCALE</>$LOCALE</" $LINGFILE.$OLDLOCALE > $LINGFILE + + # Change Setup.xml + if grep -q '<ooLocale cfg:type' $SETUPFILE ; then + cp $SETUPFILE $SETUPFILE.$OLDLOCALE + sed "s/>$OLDLOCALE</>$LOCALE</" $SETUPFILE.$OLDLOCALE > $SETUPFILE + else # ooLocale entry does not exists in Setup.xml + cp $SETUPFILE $SETUPFILE.tmp + + cat $SETUPFILE.tmp | \ + perl -e "while (<>) { /<Office>/ && print \"<L10N>\n<ooLocale cfg:type=\\\"string\\\">$LOCALE</ooLocale>\n</L10N>\n\";print \$_;}" > \ + $SETUPFILE + # this perl command is to add a <L10N> section if it does not exists. + # On my machine, it produce the following patch: + + # <Setup state="modified" cfg:package="org.openoffice" xmlns="http://openoffice.org/2000/registry/components/Setup" xmlns:cfg="http://openoffice.org/2000/registry/instance" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"> + #+ <L10N> + #+ <ooLocale cfg:type="string">fr_FR@euro</ooLocale> + #+ </L10N> + # <Office> + + rm $SETUPFILE.tmp + fi # change Setup.xml + +fi # LOCALE != OLDLOCALE + +## Previous dead installation? +[ -d $HOME/.openoffice/user ] && echo "Warning: you have a user settings directory from 1.0.0 in ~/.openoffice/user - this is no longer used" + +## +## That's it. Launch the beast (with the given args) +## +case `basename $0` in + oosetup) exec "$OOHOME/setup" ;; + oopadmin) exec "$OOHOME/spadmin" ;; + *) exec "$OOHOME/soffice" "$@" ;; +esac + +## Changelog +# 07/10 challs +# * use 1.0.1 directory and improve error checking +# 07/02 challs +# * use readlink in /proc/PID/exe to get +# real session manager name +# 06/12 challs +# * merge into main package +# * change $@ to "$@" +# * source configuration file: +# /etc/openoffice/openoffice.conf +# 06/12 mquinson +# * strace only when DEBUG is set to yes +# * readd the $@ to pass the args to soffice +# 06/06 mquinson +# * Make sure the OLDLOCALE is never empty +# * handle the case where the locale is C diff --git a/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r1 b/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r1 deleted file mode 100644 index be3d2650faad..000000000000 --- a/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r1 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 24b64e79509f4e6b4e458fe35f82c762 OOo_1.0.0_LinuxIntel_install.tar.gz 69877656 -MD5 7f19c3b07938ebeeada00c968d048264 openoffice-1.0.0-registry.tbz2 126826 diff --git a/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r2 b/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r2 deleted file mode 100644 index b4959b03cb4a..000000000000 --- a/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.0-r2 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 24b64e79509f4e6b4e458fe35f82c762 OOo_1.0.0_LinuxIntel_install.tar.gz 69877656 -MD5 7097e016fdfdfc01b4e98da4a42dcff7 openoffice-1.0.0b-registry.tbz2 126982 diff --git a/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.1 b/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.1 new file mode 100644 index 000000000000..a8ed9b3402b0 --- /dev/null +++ b/app-office/openoffice-bin/files/digest-openoffice-bin-1.0.1 @@ -0,0 +1 @@ +MD5 e03cb9573ff176b47fb2101732104d83 OOo_1.0.1_LinuxIntel_install.tar.gz 74286597 diff --git a/app-office/openoffice-bin/openoffice-bin-1.0.0-r1.ebuild b/app-office/openoffice-bin/openoffice-bin-1.0.0-r1.ebuild deleted file mode 100644 index 249607bd340d..000000000000 --- a/app-office/openoffice-bin/openoffice-bin-1.0.0-r1.ebuild +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.0.0-r1.ebuild,v 1.3 2002/08/01 10:53:17 seemant Exp $ - -# NOTE: There are two big issues that should be addressed. -# -# 1) The registry should be generated as done via "./setup -net", -# and not via the tarball. -# -# 2) Language support and fonts should be addressed. -# -# It will also be good to generate regcomp via some other method. - -MY_PV="`echo ${PV} | gawk '{ print toupper($1) }'`" -LOC="/opt" -MAIN_VER="`echo ${PV} |sed -e "s:[a-z]::g"`" -S="${WORKDIR}/install" -DESCRIPTION="OpenOffice productivity suite" -SRC_URI="http://ny1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz - http://sf1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz - http://www.ibiblio.org/gentoo/distfiles/openoffice-${PV}-registry.tbz2" -HOMEPAGE="http://www.openoffice.org" - -DEPEND=">=sys-devel/perl-5.0 - virtual/x11 - app-arch/zip - app-arch/unzip - >=virtual/jdk-1.3.1" - -SLOT="0" -KEYWORDS="x86 -ppc -sparc -sparc64" -LICENSE="LGPL-2 | SISSL-1.1" - -src_unpack() { - - unpack OOo_${MY_PV}_LinuxIntel_install.tar.gz -} - -src_install() { - - # Generate a install script - PREFIX=${D} - REGCOMP=${S}/regcomp - INSTDIR=${S} - DESTDIR=${D}${LOC}/OpenOffice-${PV} - export PREFIX REGCOMP INSTDIR DESTDIR - export RUNARGS="install" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-install.sh || die - chmod 0755 ${S}/gentoo-install.sh - - # Generate a register and createdb scripts - PREFIX="" - REGCOMP=${LOC}/OpenOffice-${PV}/program/regcomp - INSTDIR=${S} - DESTDIR=${LOC}/OpenOffice-${PV} - export PREFIX REGCOMP INSTDIR DESTDIR - export RUNARGS="register" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-register.sh || die - chmod 0755 ${S}/gentoo-register.sh - export RUNARGS="createdb" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-createdb.sh || die - chmod 0755 ${S}/gentoo-createdb.sh - - # Install to ${D} - ${S}/gentoo-install.sh || die "Failed to install data to ${D}!" - - # Install regcomp. For this we need to compile OO without - # CFLAGS/CXXFLAGS. I dont know when the config server API may - # change, so this included regcomp may not work for future - # versions of OO. - cd ${D}${LOC}/OpenOffice-${PV}/program - tar -jxf ${FILESDIR}/${PV}/regcomp-${PV}.tbz2 || \ - die "Could not unpack regcomp!" - - # Unpack the registry needed for NETWORK installation. - # This my need to be updated for future versions of OO. - # Install binary with "./setup -net" to generate. - cd ${D}${LOC}/OpenOffice-${PV}/share/config/registry - rm -rf * - tar -jxpf ${DISTDIR}/openoffice-${PV}-registry.tbz2 || \ - die "Could not unpack registry!" - # Fix paths - cd ${D}${LOC}/OpenOffice-${PV}/share/config/registry/instance/org/openoffice/Office - cp Common.xml Common.xml.orig - sed -e "s:/opt/OpenOffice.org641:${LOC}/OpenOffice-${PV}:g" \ - Common.xml.orig >Common.xml - rm -f Common.xml.orig - - # Generate ISO resource files. - cd ${D}${LOC}/OpenOffice-${PV}/program/resource - for x in ooo*.res - do - cp ${x} ${x/ooo/iso} - done - - # Create the global fonts.dir file - cd ${D}${LOC}/OpenOffice-${PV}/share/fonts/truetype - cp -f fonts.dir fonts_dir.global - - # Create misc directories - cd ${D}${LOC}/OpenOffice-${PV} - mkdir -p user/config/registry/instance/org/openoffice/{Office,ucb} - mkdir -p user/psprint/{driver,fontmetric} - mkdir -p user/{autocorr,backup,plugin,store,temp,template} - - # Move the register and createdb scripts to ${D} - cp -f ${S}/gentoo-register.sh ${D}${LOC}/OpenOffice-${PV}/program - cp -f ${S}/gentoo-createdb.sh ${D}${LOC}/OpenOffice-${PV}/program -} - -pkg_postinst() { - if [ "${ROOT}" = "/" ] - then - for x in bootstraprc configmgrrc instdb.ins sofficerc unorc - do - if [ -e ${LOC}/OpenOffice-${PV}/program/${x} ] - then - rm -f ${LOC}/OpenOffice-${PV}/program/${x} >/dev/null - fi - done - ${LOC}/OpenOffice-${PV}/program/gentoo-createdb.sh || die - echo ">>> Registering components (this may take a few minutes)..." - ${LOC}/OpenOffice-${PV}/program/gentoo-register.sh &>/dev/null || die - fi - - # Make sure these do not get nuked. - cd ${ROOT}${LOC}/OpenOffice-${PV} - mkdir -p user/config/registry/instance/org/openoffice/{Office,ucb} - mkdir -p user/psprint/{driver,fontmetric} - mkdir -p user/{autocorr,backup,plugin,store,temp,template} -} - diff --git a/app-office/openoffice-bin/openoffice-bin-1.0.0-r2.ebuild b/app-office/openoffice-bin/openoffice-bin-1.0.0-r2.ebuild deleted file mode 100644 index fa5b4527f958..000000000000 --- a/app-office/openoffice-bin/openoffice-bin-1.0.0-r2.ebuild +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.0.0-r2.ebuild,v 1.2 2002/08/01 10:53:17 seemant Exp $ - -# NOTE: There are two big issues that should be addressed. -# -# 1) The registry should be generated as done via "./setup -net", -# and not via the tarball. -# -# 2) Language support and fonts should be addressed. -# -# It will also be good to generate regcomp via some other method. - -MY_PV="`echo ${PV} | gawk '{ print toupper($1) }'`" -LOC="/opt" -MAIN_VER="`echo ${PV} |sed -e "s:[a-z]::g"`" -S="${WORKDIR}/install" -DESCRIPTION="OpenOffice productivity suite" -SRC_URI="http://ny1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz - http://sf1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz - http://www.ibiblio.org/gentoo/distfiles/openoffice-${PV}b-registry.tbz2" -HOMEPAGE="http://www.openoffice.org" - -DEPEND="virtual/glibc - >=sys-devel/perl-5.0 - virtual/x11 - app-arch/zip - app-arch/unzip - >=virtual/jdk-1.3.1" - -SLOT="0" -KEYWORDS="x86 -ppc -sparc -sparc64" -LICENSE="LGPL-2 | SISSL-1.1" - -src_unpack() { - - unpack OOo_${MY_PV}_LinuxIntel_install.tar.gz -} - -src_install() { - - # Generate a install script - PREFIX=${D} - REGCOMP=${S}/regcomp - INSTDIR=${S} - DESTDIR=${D}${LOC}/OpenOffice-${PV} - export PREFIX REGCOMP INSTDIR DESTDIR - export RUNARGS="install" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-install.sh || die - chmod 0755 ${S}/gentoo-install.sh - - # Generate a register and createdb scripts - PREFIX="" - REGCOMP=${LOC}/OpenOffice-${PV}/program/regcomp - INSTDIR=${S} - DESTDIR=${LOC}/OpenOffice-${PV} - export PREFIX REGCOMP INSTDIR DESTDIR - export RUNARGS="register" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-register.sh || die - chmod 0755 ${S}/gentoo-register.sh - export RUNARGS="createdb" - ${FILESDIR}/${PV}/read_ins.pl >${S}/gentoo-createdb.sh || die - chmod 0755 ${S}/gentoo-createdb.sh - - # Install to ${D} - ${S}/gentoo-install.sh || die "Failed to install data to ${D}!" - - # Install regcomp. For this we need to compile OO without - # CFLAGS/CXXFLAGS. I dont know when the config server API may - # change, so this included regcomp may not work for future - # versions of OO. - cd ${D}${LOC}/OpenOffice-${PV}/program - tar -jxf ${FILESDIR}/${PV}/regcomp-${PV}.tbz2 || \ - die "Could not unpack regcomp!" - - # Unpack the registry needed for NETWORK installation. - # This my need to be updated for future versions of OO. - # Install binary with "./setup -net" to generate. - cd ${D}${LOC}/OpenOffice-${PV}/share/config/registry - rm -rf * - tar -jxpf ${DISTDIR}/openoffice-${PV}b-registry.tbz2 || \ - die "Could not unpack registry!" - # Fix paths - cd ${D}${LOC}/OpenOffice-${PV}/share/config/registry/instance/org/openoffice/Office - cp Common.xml Common.xml.orig - sed -e "s:/opt/OpenOffice\.org1\.0:${LOC}/OpenOffice-${PV}:g" \ - Common.xml.orig >Common.xml - rm -f Common.xml.orig - - # Generate ISO resource files. - cd ${D}${LOC}/OpenOffice-${PV}/program/resource - for x in ooo*.res - do - cp ${x} ${x/ooo/iso} - done - - # Create the global fonts.dir file - cd ${D}${LOC}/OpenOffice-${PV}/share/fonts/truetype - cp -f fonts.dir fonts_dir.global - - # Create misc directories - cd ${D}${LOC}/OpenOffice-${PV} - mkdir -p user/config/registry/instance/org/openoffice/{Office,ucb} - mkdir -p user/psprint/{driver,fontmetric} - mkdir -p user/{autocorr,backup,plugin,store,temp,template} - - # Move the register and createdb scripts to ${D} - cp -f ${S}/gentoo-register.sh ${D}${LOC}/OpenOffice-${PV}/program - cp -f ${S}/gentoo-createdb.sh ${D}${LOC}/OpenOffice-${PV}/program -} - -pkg_postinst() { - if [ "${ROOT}" = "/" ] - then - for x in bootstraprc configmgrrc instdb.ins sofficerc unorc - do - if [ -e ${LOC}/OpenOffice-${PV}/program/${x} ] - then - rm -f ${LOC}/OpenOffice-${PV}/program/${x} >/dev/null - fi - done - ${LOC}/OpenOffice-${PV}/program/gentoo-createdb.sh || die - echo ">>> Registering components (this may take a few minutes)..." - ${LOC}/OpenOffice-${PV}/program/gentoo-register.sh &>/dev/null || die - fi - - # Make sure these do not get nuked. - cd ${ROOT}${LOC}/OpenOffice-${PV} - mkdir -p user/config/registry/instance/org/openoffice/{Office,ucb} - mkdir -p user/psprint/{driver,fontmetric} - mkdir -p user/{autocorr,backup,plugin,store,temp,template} -} - diff --git a/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild b/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild index 661a35e92584..08eb05fff864 100644 --- a/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild +++ b/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild,v 1.1 2002/09/09 21:17:21 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.0.0-r3.ebuild,v 1.2 2002/09/15 16:00:42 azarah Exp $ inherit virtualx @@ -99,8 +99,8 @@ pkg_postinst() { # Make sure these do not get nuked. cd ${ROOT}${LOC}/OpenOffice-${PV} - keepdir -p user/config/registry/instance/org/openoffice/{Office,ucb} - keepdir -p user/psprint/{driver,fontmetric} - keepdir -p user/{autocorr,backup,plugin,store,temp,template} + keepdir ${ROOT}${LOC}/OpenOffice-${PV}/user/config/registry/instance/org/openoffice/{Office,ucb} + keepdir ${ROOT}${LOC}/OpenOffice-${PV}/user/psprint/{driver,fontmetric} + keepdir ${ROOT}${LOC}/OpenOffice-${PV}/user/{autocorr,backup,plugin,store,temp,template} } diff --git a/app-office/openoffice-bin/openoffice-bin-1.0.1.ebuild b/app-office/openoffice-bin/openoffice-bin-1.0.1.ebuild new file mode 100644 index 000000000000..63edb6414a4e --- /dev/null +++ b/app-office/openoffice-bin/openoffice-bin-1.0.1.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.0.1.ebuild,v 1.1 2002/09/15 16:00:42 azarah Exp $ + +inherit virtualx + +# NOTE: There are two big issues that should be addressed. +# +# 1) Language support and fonts should be addressed. + +LOC="/opt" + +INSTDIR="${LOC}/OpenOffice.org${PV}" +MY_PV="`echo ${PV} | gawk '{ print toupper($1) }'`" +S="${WORKDIR}/install" +DESCRIPTION="OpenOffice productivity suite" +SRC_URI="x86? ( http://ny1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz + http://sf1.mirror.openoffice.org/${PV}/OOo_${MY_PV}_LinuxIntel_install.tar.gz )" +HOMEPAGE="http://www.openoffice.org" + +DEPEND="virtual/glibc + >=sys-devel/perl-5.0 + virtual/x11 + app-arch/zip + app-arch/unzip + >=virtual/jdk-1.3.1" + +LICENSE="LGPL-2 | SISSL-1.1" +SLOT="0" +KEYWORDS="x86 -ppc -sparc -sparc64" + +src_unpack() { + + unpack OOo_${MY_PV}_LinuxIntel_install.tar.gz +} + +src_install() { + + # Autoresponse file for main installation + cat > ${T}/rsfile-global <<-"END_RS" + [ENVIRONMENT] + INSTALLATIONMODE=INSTALL_NETWORK + INSTALLATIONTYPE=STANDARD + DESTINATIONPATH=<destdir> + OUTERPATH= + LOGFILE= + LANGUAGELIST=<LANGUAGE> + + [JAVA] + JavaSupport=preinstalled_or_none + END_RS + + # Autoresponse file for user isntallation + cat > ${T}/rsfile-local <<-"END_RS" + [ENVIRONMENT] + INSTALLATIONMODE=INSTALL_WORKSTATION + INSTALLATIONTYPE=WORKSTATION + DESTINATIONPATH=<home>/.openoffice/<pv> + + [JAVA] + JavaSupport=none + END_RS + + # Fixing install location in response file + sed -e "s|<destdir>|${D}${INSTDIR}|" \ + ${T}/rsfile-global > ${T}/autoresponse + + einfo "Installing OpenOffice.org into build root..." + dodir ${INSTDIR} + cd ${S} + # Setup virtualmake + export maketype="./setup" + # We need X to install... + virtualmake "-v -r:${T}/autoresponse" + + echo + einfo "Removing build root from registy..." + # Remove totally useless stuff. + rm -f ${D}${INSTDIR}/program/{setup.log,sopatchlevel.sh} + # Remove build root from registry and co + egrep -rl "${D}" ${D}${INSTDIR}/* | \ + xargs -i perl -pi -e "s|${D}||g" {} || : + + einfo "Fixing permissions..." + # Fix permissions + find ${D}${INSTDIR}/ -type f -exec chmod a+r {} \; + chmod a+x ${D}${INSTDIR}/share/config/webcast/*.pl + + # Fix symlinks + for x in "soffice program/spadmin" \ + "program/setup setup" \ + "program/spadmin spadmin" + do + dosym $(echo ${x} | awk '{print $1}') \ + ${INSTDIR}/$(echo ${x} | awk '{print $2}') + done + + # Install user autoresponse file + insinto /etc/openoffice + sed -e "s|<pv>|${PV}|g" ${T}/rsfile-local > ${T}/autoresponse.conf + doins ${T}/autoresponse.conf + + # Install wrapper script + exeinto /usr/bin + sed -e "s|<pv>|${PV}|g" \ + ${FILESDIR}/${PV}/ooffice-wrapper > ${T}/ooffice + doexe ${T}/ooffice + # Component symlinks + dosym ooffice /usr/bin/oocalc + dosym ooffice /usr/bin/oodraw + dosym ooffice /usr/bin/ooimpress + dosym ooffice /usr/bin/oomath + dosym ooffice /usr/bin/oowriter + dosym ooffice /usr/bin/oosetup + dosym ooffice /usr/bin/oopadmin + + einfo "Installing Menu shortcuts (need \"gnome\" or \"kde\" in USE)..." + if [ -n "`use gnome`" ] + then + insinto /usr/share/gnome/apps/OpenOffice.org + # Install the files needed for the catagory + doins ${D}${INSTDIR}/share/gnome/net/.directory + doins ${D}${INSTDIR}/share/gnome/net/.order + + for x in ${D}${INSTDIR}/share/gnome/net/*.desktop + do + # We have to handle setup differently + perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x} + # Now fix the rest + perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x} + doins ${x} + done + fi + + if [ -n "`use kde`" ] + then + local kdeloc="${D}${INSTDIR}/share/kde/net/applnk/OpenOffice.org${PV}" + + # Portage do not work with the space .. + mv ${D}${INSTDIR}/share/kde/net/applnk/OpenOffice.org\ ${PV} ${kdeloc} + + insinto /usr/share/applnk/OpenOffice.org + # Install the files needed for the catagory + doins ${kdeloc}/.directory + doins ${kdeloc}/.order + dodir /usr/share + # Install the icons and mime info + cp -a ${D}${INSTDIR}/share/kde/net/mimelnk/share/* ${D}/usr/share + + for x in ${kdeloc}/*.desktop + do + # We have to handle setup differently + perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x} + # Now fix the rest + perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x} + doins ${x} + done + fi + + # Unneeded, as they get installed into /usr/share... + rm -rf ${D}${INSTDIR}/share/{cde,gnome,kde} + + # Make sure these do not get nuked. + keepdir ${INSTDIR}/user/config/registry/instance/org/openoffice/{Office,ucb} + keepdir ${INSTDIR}/user/psprint/{driver,fontmetric} + keepdir ${INSTDIR}/user/{autocorr,backup,plugin,store,temp,template} +} + +pkg_preinst() { + + # The one with OO-1.0.0 was not valid + if [ -f ${ROOT}/etc/openoffice/autoresponse.conf ] + then + rm -f ${ROOT}/etc/openoffice/autoresponse.conf + fi +} + +pkg_postinst() { + + einfo "******************************************************************" + einfo " To start OpenOffice.org, run:" + einfo + einfo " $ ooffice" + einfo + einfo " Also, for individual components, you can run use any of:" + einfo + einfo " oocalc, oodraw, ooimpress, oomath or oowriter" + einfo + einfo "******************************************************************" +} + |