# Description: Suite complète de office en logiciel libre # URL: http://www.openoffice.org # Packager: Sibelle at free dot fr # Maintainer: NuTyX packager team # Depends on: imagemagick, linux-pam, libart_lgpl, xorg-libxtst, p5-archive-zip, cairo, libwpd, cups, curl, python, xorg-libxaw, neon, dbus-glib, icu, libxslt, hicolor-icon-theme, desktop-file-utils, boost, gtk, libsndfile name=openoffice version=3.2.0 release=1 OOdir=OOO320_m12 backup=(usr/lib/openoffice/program/sofficerc) source=(http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_core.tar.bz2 \ http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_extensions.tar.bz2\ http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_l10n.tar.bz2 \ http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_binfilter.tar.bz2\ http://www.paldo.org/paldo/sources/OpenOffice.org/OpenOffice.org-3.2.0-default-no-registration.patch.bz2 \ http://www.paldo.org/paldo/sources/OpenOffice.org/OpenOffice.org-3.2.0-default-large-buttons.patch.bz2 \ http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_system.tar.bz2\ http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_src_testautomation.tar.bz2\ http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll \ startcenter.desktop \ default-no-startup-wizard.diff \ default-system-fpicker.diff \ soffice-detect-mozilla-certificates.diff \ buildfix-gcc44.diff \ buildfix_FormulaMissingHeader.diff \ buildfix_system_db48.diff \ openoffice.profile ) build() { install -D -m644 startcenter.desktop \ $PKG/usr/share/ede/programs/Applications/startcenter.desktop mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/share/icons mkdir -p $PKG/usr/share/applications bzip2 -d $SRC/OpenOffice.org-3.2.0-default-no-registration.patch.bz2 bzip2 -d $SRC/OpenOffice.org-3.2.0-default-large-buttons.patch.bz2 cd $OOdir patch -Np0 -i $SRC/OpenOffice.org-3.2.0-default-no-registration.patch patch -Np0 -i $SRC/default-no-startup-wizard.diff patch -Np0 -i $SRC/default-system-fpicker.diff patch -Np0 -i $SRC/OpenOffice.org-3.2.0-default-large-buttons.patch cd $SRC/$OOdir ./configure --prefix=/usr \ --sysconfdir=/etc \ --disable-graphite \ --disable-ldap \ --disable-mozilla \ --disable-odk \ --disable-qadevooo \ --disable-fontooo \ --disable-systray \ --enable-dbus \ --disable-gnome-vfs \ --enable-gio \ --disable-build-mozilla \ --disable-binfilter \ --without-agg \ --without-gpc \ --without-fonts \ --without-ppds \ --without-afms \ --with-package-format=native \ --with-system-libs \ --without-system-lucene \ --without-system-hsqldb \ --without-system-beanshell \ --without-system-saxon \ --with-system-boost \ --without-system-hunspell \ --without-system-altlinuxhyph \ --without-system-lpsolve \ --without-stlport4 \ --without-java --with-lang="en-US de fr it es pt pl tr" \ --with-use-shell=bash --with-alloc=system # source LinuxX86Env.Set.sh # Build dmake utility ./bootstrap cd instsetoo_native/util build.pl --dlv_switch -link --all -P0 -- -P0 -s # install binaries cp -R instsetoo_native/unxlngi6.pro/OpenOffice/native/install/fr/linux-2.6-intel/buildroot/* $PKG/ # move all to /usr/lib mkdir -p $PKG/usr/lib mv $PKG/opt/* $PKG/usr/lib/ rmdir $PKG/opt ## Step 1 cd $PKG/usr/lib/openoffice.orgi mv ure/ basis3.2/ cd basis3.2 rm ure-link && mv ure ure-link ## Step 2 cd $PKG/usr/lib/ mv openoffice.org/basis3.2/ openoffice.org3/ cd openoffice.org3/ rm basis-link && mv basis3.2 basis-link ## Step 3 cd $PKG/usr/lib/ rmdir $PKG/usr/lib/openoffice.org mv openoffice.org3 openoffice # install all built dictionaries from source tree pushd $SRC/$OOdir/dictionaries/unxlng?6.pro/bin for i in `ls -1 dict-??.oxt`; do install -D -m644 $i $PKG/usr/lib/openoffice/share/extension/install/$i done popd # install extensions pushd $SRC/$OOdir/solver/320/unxlng?6.pro/bin install -D -m644 sun-report-builder.oxt $PKG/usr/lib/openoffice/share/extension/install/sun-report-builder.oxt install -D -m644 swext/wiki-publisher.oxt $PKG/usr/lib/openoffice/share/extension/install/wiki-publisher.oxt install -D -m644 minimizer/sun-presentation-minimizer.oxt $PKG/usr/lib/openoffice/share/extension/install/sun-presentation-minimizer.oxt install -D -m644 presenter/presenter-screen.oxt $PKG/usr/lib/openoffice/share/extension/install/presenter-screen.oxt install -D -m644 pdfimport/pdfimport.oxt $PKG/usr/lib/openoffice/share/extension/install/pdfimport.oxt popd # prepare filesystem entries mkdir -p $PKG/usr/{bin,share/applications} mkdir -p $PKG/usr/share/icons/{hicolor,locolor} # install shortcuts mv $PKG/usr/lib/openoffice/share/xdg/*.desktop $PKG/usr/share/applications # add startcenter desktop file install -D -m644 $SRC/startcenter.desktop $PKG/usr/share/applications/startcenter.desktop cd $PKG/usr/share/applications sed -i -e 's|Exec=openoffice.org3|Exec=/usr/bin/soffice|g' *.desktop sed -i -e 's|Exec=/usr/bin/soffice-printeradmin|Exec=/usr/bin/spadmin|g' printeradmin.desktop # fix exec commands in shortcuts for Xfce menu sed -i -e 's|base %U|base|g' base.desktop sed -i -e 's|calc %U|calc|g' calc.desktop sed -i -e 's|draw %U|draw|g' draw.desktop sed -i -e 's|impress %U|impress|g' impress.desktop sed -i -e 's|math %U|math|g' math.desktop sed -i -e 's|writer %U|writer|g' writer.desktop # remove quickstarter, we disabled it above rm -rf $PKG/usr/share/applications/qstart.desktop # fix icons in desktop files sed -i -e 's|Icon=openofficeorg3-|Icon=|g' *.desktop # install icons cd $SRC/$OOdir/sysui/desktop/icons cp -a -v hicolor/*x* $PKG/usr/share/icons/hicolor cp -a -v locolor/*x* $PKG/usr/share/icons/locolor # just in case icon calc is used by calculator :) find $PKG/usr/share/icons -type d -name apps -exec mv {}/calc.png {}/ooocalc.png \; sed -i -e 's|Icon=calc|Icon=ooocalc|g' $PKG/usr/share/applications/calc.desktop # already done above # fix ownership and permissions chown root.root -R $PKG/ chmod +rX -R $PKG/usr # set desktop variable to force gtk/gnome vcl usage install -m755 -d $PKG/etc/profile.d install -m755 $PKG/openoffice.profile $PKG/etc/profile.d/openoffice.sh # make symlinks cd $PKG/usr/bin ln -s /usr/lib/openoffice/program/soffice soffice ln -s /usr/lib/openoffice/program/spadmin spadmin # link the mozilla-plugin mkdir -p $PKG/usr/lib/mozilla/plugins/ cd $PKG/usr/lib/mozilla/plugins/ ln -v -s /usr/lib/openoffice/program/libnpsoplugin.so . }