# # spec file for package libreoffice (Version 3.2.1.4) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: libreoffice # allow to use xulrunner191 on SLED11-SP1 (bnc#540726) %define use_xulrunner191 no Version: 3.3.2.2 Release: 1 %define piece postprocess %define ooo_build_version 3.3.2.2 %define ooo_piece_version 3.3.2.2 %define ooo_sourcedirname libreoffice-build-%ooo_piece_version %define ooo_prefix %_libdir %define ooo_home libreoffice BuildRequires: ImageMagick ant ant-apache-regexp bison boost-devel ccache cups-devel curl-devel flac-devel flex gcc-c++ gnome-vfs2-devel gperf gtk2-devel icu java-devel libexif libxml2-devel mono-devel neon-devel pam-devel perl-Archive-Zip perl-Compress-Zlib postgresql-devel python-devel recode unixODBC-devel unzip xml-commons-apis zip ############################ # basic stuff %if 0%{?suse_version} BuildRequires: db-devel krb5 openldap2-devel python-xml update-desktop-files xorg-x11 %endif %if 0%{?meego_version} BuildRequires: db4-devel krb5-devel openldap-devel BuildRequires: xorg-x11-server-devel BuildRequires: xorg-x11-proto-xproto BuildRequires: xorg-x11-utils %endif ############################ # KDE3 stuff %if 0%{?suse_version} BuildRequires: kdelibs3-devel %endif ############################ # mozilla stuff %if 0%{?suse_version} > 01130 BuildRequires: mozilla-xulrunner192-devel %endif %if 0%{?suse_version} <= 01130 %if 0%{?suse_version} > 01110 || %use_xulrunner191 == yes BuildRequires: mozilla-xulrunner191-devel %endif %endif %if 0%{?suse_version} > 01100 && 0%{?suse_version} <= 01110 && %use_xulrunner191 != yes BuildRequires: mozilla-xulrunner190-devel %endif %if 0%{?suse_version} > 01010 && 0%{?suse_version} <= 01100 BuildRequires: mozilla-xulrunner181-devel %endif %if 0%{?suse_version} > 01000 && 0%{?suse_version} <= 01010 BuildRequires: gecko-sdk mozilla-xulrunner %endif %if 0%{?meego_version} BuildRequires: xulrunner-devel %endif ############################ # expat stuff %if 0%{?suse_version} > 01100 # libexpat-devel is explicitely needed since openSUSE-11.1 BuildRequires: libexpat-devel %endif %if 0%{?meego_version} BuildRequires: expat-devel %endif ############################ # poppler is needed to build the PDF import extension # the needed version 0.8.0 has been avaiable only since openSUSE-11.0 %if 0%{?suse_version} >= 01100 BuildRequires: libpoppler-devel %endif %if 0%{?meego_version} BuildRequires: poppler-devel %endif ############################ # openSUSE 10.3 features %if 0%{?suse_version} > 01020 || 0%{?meego_version} BuildRequires: libicu-devel %endif ############################ # openSUSE 11.0 features %if 0%{?suse_version} > 01030 || 0%{?meego_version} BuildRequires: hunspell-devel libwpd-devel libwpg-devel libwps-devel %endif ############################ # CODE10 features ############################ %if 0%{?suse_version} > 01000 BuildRequires: gstreamer010-plugins-base-devel sablot-devel xalan-j2 xerces-j2 xml-commons-apis %endif %if 0%{?meego_version} BuildRequires: gst-plugins-base-devel sablot-devel xalan-j2 xerces-j2 xml-commons-apis %endif #!BuildIgnore: libreoffice BuildRequires: libreoffice-branding-upstream > 3.2.99.3 BuildRequires: libreoffice-artwork-devel = %version BuildRequires: libreoffice-base-devel = %version BuildRequires: libreoffice-bootstrap = %version BuildRequires: libreoffice-calc-devel = %version BuildRequires: libreoffice-components-devel = %version BuildRequires: libreoffice-impress-devel = %version BuildRequires: libreoffice-filters-devel = %version BuildRequires: libreoffice-help-en-US-devel = %version #BuildRequires: libreoffice-l10n-devel = %version BuildRequires: libreoffice-libs-core-devel = %version BuildRequires: libreoffice-libs-extern-devel = %version BuildRequires: libreoffice-libs-gui-devel = %version BuildRequires: libreoffice-ure-devel = %version BuildRequires: libreoffice-writer-devel = %version BuildRequires: libreoffice-filters-devel = %version License: Artistic ; BSD3c ; GPLv2+ ; LPPL .. ; LGPLv2.1+ ; LGPLv3 ; MPL .. ; MIT Group: Productivity/Office/Suite AutoReqProv: on Requires: libreoffice-ure = %version Requires: libreoffice-components = %version Requires: libreoffice-filters = %version Requires: libreoffice-icon-themes = %version Requires: libreoffice-libs-core = %version Requires: libreoffice-libs-extern = %version Requires: libreoffice-libs-gui = %version Requires: libreoffice-l10n-extras = %version Requires: libreoffice-branding > 3.2.99.3 Requires: libreoffice-branding < 4 %if %{?suse_version} Recommends: libreoffice-base Recommends: libreoffice-calc Recommends: libreoffice-draw Recommends: libreoffice-math Recommends: libreoffice-impress Recommends: libreoffice-writer Recommends: libreoffice-filters Recommends: libreoffice-mailmerge Recommends: libreoffice-hyphen Recommends: libreoffice-thesaurus-en Recommends: libreoffice-help-en-US %endif # compat stuff Provides: OpenOffice_org = %version Obsoletes: OpenOffice_org <= %version # compatibility with the older split build used in the Build Service (bnc#471280) # the l10n package was available only for a short time # during the 11.1 alpha phase Provides: OpenOffice_org-l10n-en-US = %version Obsoletes: OpenOffice_org-l10n-en-US <= %version # some other compat suff Provides: OpenOffice_org17 Obsoletes: OpenOffice_org17 Provides: OpenOffice_org-en OpenOffice_org-en-help OpenOffice_org2 Obsoletes: OpenOffice_org-en OpenOffice_org-en-help OpenOffice_org2 Provides: OpenOffice_org-hunspell OpenOffice_org2-hunspell Obsoletes: OpenOffice_org-hunspell OpenOffice_org2-hunspell # we need a JRE for oobase and the other stuff %if 0%{?suse_version} # gij is enough on SL 10.1 and higher %if 0%{?suse_version} > 01000 # --- %ifarch %ix86 # the 32-bit build requires 32-bit JRE, #222708 Recommends: jre-32 >= 1.6 %endif # --- %ifarch x86_64 %if 0%{?suse_version} > 01020 Recommends: jre-64 >= 1.6 %endif # the 64-bit build does not work with Sun Java on older distributions, #219982 %if 0%{?suse_version} == 01020 Requires: gcc-gij %endif %if 0%{?suse_version} && 0%{?suse_version} < 01020 Requires: libgcj %endif %endif # --- %ifarch ppc %if 0%{?suse_version} > 01020 Recommends: jre-32 >= 1.6 %endif # there were problems with the commercial Java on ppc on older distribtions %if 0%{?suse_version} == 01020 Requires: gcc-gij %endif %if 0%{?suse_version} && 0%{?suse_version} < 01020 Requires: libgcj %endif %endif %endif %endif %if 0%{?meego_version} Requires: jre >= 1.5 %endif # --- Requires: xalan-j2 xerces-j2 xml-commons-apis # post install scripts %if 0%{?suse_version} > 01120 Requires(post): gtk2 Requires(postun): gtk2 %endif %if 0%{?suse_version} && 0%{?suse_version} <= 01120 PreReq: gtk2 %endif Summary: A Free Office Suite (Framework) Url: http://www.documentfoundation.org/ Source: libreoffice-%piece-%ooo_piece_version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 ppc %description LibreOffice is a comprehensive office package featuring a word processor, a spreadsheet, a presentation program, and much more. This package provides only the basic framework. You have to install the additional modules to get the required functionality, see packages: - libreoffice-base - libreoffice-calc - libreoffice-draw - libreoffice-impress - libreoffice-math - libreoffice-writer Some optional features are provided by extra packages, for example: - libreoffice-mailmerge - libreoffice-filters - libreoffice-kde - libreoffice-gnome Non-English localizations are provided by extra packges as well, for example: - libreoffice-de - libreoffice-fr - libreoffice-it %package icon-themes-prebuilt License: LGPLv2.0 ; LGPLv3 Summary: Prebuilt LibreOffice Icon Themes Group: Development/Sources AutoReqProv: off # compat stuff Provides: OpenOffice_org-icon-themes-prebuilt = %version Obsoletes: OpenOffice_org-icon-themes-prebuilt <= %version %description icon-themes-prebuilt This package includes the prebuilt LibreOffice Icon Themes. It is not intended for real use. It needs to be repacked to the real architecture independent package. This is only temporary solution to get an installable set of LibreOffice packages for a new version as fast as possible. The architecture independent package will be built from the original sources in the future. %package l10n-prebuilt License: LGPLv3 Summary: Prebuilt LibreOffice Postprocess Localizations Group: Productivity/Office/Suite AutoReqProv: off # compat stuff Provides: OpenOffice_org-l10n-prebuilt = %version Obsoletes: OpenOffice_org-l10n-prebuilt <= %version %description l10n-prebuilt This package includes the prebuilt localization of LibreOffice postprocess. It is not intended for a real use. It needs to be repacked to the real architecture independent package. This is only a temporary solution until we have an easier way to build the LibreOffice localizations separately. %prep %setup -q -n libreoffice-%piece-%ooo_piece_version %build # setup env. export OO_INSTDIR=%{_libdir}/%ooo_home export OO_TOOLSDIR=$OO_INSTDIR/build/bin export VERBOSE=1 export PIECE_BUILD_NCPUS_AUTO=1 export PIECE_USE_JOBS="%{?jobs:%jobs}" # FIXME: hack to avoid dependecy problem $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname || $OO_TOOLSDIR/piece/build-generic %piece %ooo_sourcedirname %install # setup env. export OO_INSTDIR=%{_libdir}/%ooo_home export OO_TOOLSDIR=$OO_INSTDIR/build/bin export DESTDIR=$RPM_BUILD_ROOT export OO_ALLOW_PROFILES=1 $OO_TOOLSDIR/piece/install-generic %piece %ooo_sourcedirname %if 0%{?suse_version} %suse_update_desktop_file startcenter %suse_update_desktop_file template %endif %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig /usr/bin/update-mime-database /usr/share/mime >/dev/null || true # update GNOME icon caches %if 0%{?suse_version} > 01130 %icon_theme_cache_post %endif %if 0%{?suse_version} && 0%{?suse_version} <= 01130 SuSEconfig --module gtk2 || true %endif # # /usr/bin/ooffice symlink is necessary by java UNO components to find the UNO # installation using $PATH, see # http://udk.openoffice.org/common/man/spec/transparentofficecomponents.html # this scriptlet supports parallel installation of more OOo instances soffice_symlink="/usr/bin/soffice" default_wrapper="%ooo_prefix/%ooo_home/program/soffice" if test -x "$default_wrapper" ; then # this package installs the preferred OOo wrappers => it is getting to be the default OOo => remove od symlink test -L "$soffice_symlink" && rm -f "$soffice_symlink" || true test -e "$soffice_symlink" || ln -sf "$default_wrapper" "$soffice_symlink" || true fi %preun test "$1" = "0" && rm -rf ./%ooo_prefix/%ooo_home/share/uno_packages/cache || true %postun /sbin/ldconfig /usr/bin/update-mime-database /usr/share/mime >/dev/null || true # update GNOME icon caches %if 0%{?suse_version} > 01130 %icon_theme_cache_postun %endif %if 0%{?suse_version} && 0%{?suse_version} <= 01130 SuSEconfig --module gtk2 || true %endif # # /usr/bin/ooffice symlink is necessary by java UNO components to find the UNO # installation using $PATH, see # http://udk.openoffice.org/common/man/spec/transparentofficecomponents.html # this scriptlet supports parallel installation of more OOo instances soffice_symlink="/usr/bin/soffice" # the current package has been removed; try to find any other OOo installation default_wrapper="`ls /usr/lib*/ooo*/program/soffice 2>/dev/null | head -n 1`" test -L "$soffice_symlink" -a ! -r "$soffice_symlink" && rm -f "$soffice_symlink" || true test -x "$default_wrapper" -a ! -e "$soffice_symlink" && ln -sf "$default_wrapper" "$soffice_symlink" || true # FIXME: just to make lint check happy %triggerin -- mysql-connector-java %ooo_prefix/%ooo_home/basis-link/program/java-set-classpath /usr/share/java/mysql-connector-java.jar || true %triggerpostun -- mysql-connector-java %ooo_prefix/%ooo_home/basis-link/program/java-set-classpath /usr/share/java/mysql-connector-java.jar || true %files -f files-%piece.txt %defattr(-,root,root) %files -f files-icon-themes.txt icon-themes-prebuilt %defattr(-,root,root) %files l10n-prebuilt %defattr(-,root,root) %ooo_prefix/%ooo_home/solver/noarch %changelog