# download path contains version without the last (fourth) digit %define libo_version 4.1.3 # Should contain .alphaX / .betaX, if this is pre-release (actually # pre-RC) version. The pre-release string is part of tarball file names, # so we need a way to define it easily at one place. %define libo_prerelease %nil %define vendoroption --with-vendor="Mageia" # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF %define __jar_repack %{nil} # don't worry about whitespace for now %define _default_patch_flags -s -l %define _default_patch_fuzz 2 %define Werror_cflags %nil # make it easier to download sources from pre-release site %define source_url http://dev-builds.libreoffice.org/pre-releases/src #define source_url http://download.documentfoundation.org/libreoffice/src/%libo_version # URL for external projects' tarballs %define external_url http://dev-www.libreoffice.org/src/ # get english only and no-langpacks for a faster smoketest build %bcond_without langpacks %define system_boost 1 %if %{with langpacks} # generated by %%langpack definitions %global langpack_langs %{nil} %else %global langpack_langs en-US %endif %global build_gtk3 1 %define with_mergedlibs 0 %define _requires_exceptions libjawt.so\\|libmyspell.so\\|libstlport_gcc.so\\|libmono.so\\|mono\\|devel(libstlport_gcc)\\|libxmlreader.so\\|libcomphelp4gcc3.so\\|devel(libreg)\\|devel(libxmlreader)\\|devel(libreg(64bit))\\|devel(libxmlreader(64bit))\\|devel(libunoidl)\\|devel(libunoidl(64bit)) %define _provides_exceptions libsndfile.so\\|libportaudio.so\\|libdb-4.2.so\\|libdb_java-4.2.so\\|libmyspell.so\\|libstlport_gcc.so\\|librdf.so.0\\|libraptor.so.1\\|libxmlsec1-nss.so.1\\|libxmlsec1.so.1 %define _enable_debug_packages 0 Name: libreoffice Version: %{libo_version}.1 Release: %mkrel 2%{?libo_prerelease} Summary: Free Software Productivity Suite License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 Group: Office/Suite URL: http://www.libreoffice.org/default/ Source0: %{source_url}/libreoffice-%{version}%{?libo_prerelease}.tar.xz Source1: %{source_url}/libreoffice-help-%{version}%{?libo_prerelease}.tar.xz Source2: %{source_url}/libreoffice-translations-%{version}%{?libo_prerelease}.tar.xz Source3: http://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll Source4: libreoffice-multiliblauncher.sh Source5: %{external_url}/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz Source6: %{external_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip Source7: %{external_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz Source8: %{external_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip Source9: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip #Unfortunately later versions of hsqldb changed the file format, so if we use a later version we loose #backwards compatability. Source10: %{external_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip Source28: %{external_url}/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2 # build tools BuildRequires: autoconf BuildRequires: automake BuildRequires: bc BuildRequires: binutils BuildRequires: bison BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: findutils BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: gperf BuildRequires: icu BuildRequires: make BuildRequires: perl(Archive::Zip) BuildRequires: perl(Digest::MD5) BuildRequires: zip # libs / headers BuildRequires: libGConf2-devel BuildRequires: bluez-devel %if 0%{?system_boost} BuildRequires: boost-devel %endif BuildRequires: clucene-devel BuildRequires: cppunit-devel BuildRequires: cups-devel BuildRequires: dbus-glib-devel BuildRequires: evolution-data-server-devel BuildRequires: expat-devel BuildRequires: fontpackages-devel BuildRequires: freetype-devel BuildRequires: graphite2-devel BuildRequires: gstreamer1.0-devel %if %{build_gtk3} BuildRequires: gtk+3-devel %endif BuildRequires: gtk2-devel BuildRequires: harfbuzz-devel BuildRequires: hunspell-devel BuildRequires: hyphen-devel BuildRequires: kdelibs4-devel BuildRequires: libice-devel BuildRequires: libcdr-devel BuildRequires: libcmis-devel = 0.3.1 BuildRequires: libcurl-devel BuildRequires: libexttextcat-devel BuildRequires: libgstreamer1.0-plugins-base-devel BuildRequires: libicu-devel BuildRequires: libxt-devel BuildRequires: libidn-devel BuildRequires: libjpeg-devel BuildRequires: liblangtag-devel BuildRequires: libmspub-devel BuildRequires: mwaw-devel BuildRequires: libodfgen-devel BuildRequires: liborcus-devel BuildRequires: librsvg2-devel BuildRequires: libtextcat-devel BuildRequires: libvisio-devel BuildRequires: libwpd-devel >= 0.9.0 BuildRequires: libwpg-devel >= 1:0.2.0 BuildRequires: libwps-devel >= 1:0.2.0 BuildRequires: libxext-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: lpsolve-devel BuildRequires: mdds-devel BuildRequires: mythes-devel BuildRequires: neon-devel BuildRequires: nss-devel BuildRequires: openldap-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pkgconfig(dbus-glib-1) >= 0.70 BuildRequires: pkgconfig(ORBit-2.0) BuildRequires: pkgconfig(poppler) BuildRequires: pkgconfig(poppler-cpp) BuildRequires: pkgconfig(poppler-glib) BuildRequires: postgresql-devel BuildRequires: python3-devel BuildRequires: redland-devel BuildRequires: rsync BuildRequires: sane-devel BuildRequires: unixODBC-devel BuildRequires: vigra-devel BuildRequires: zlib-devel BuildRequires: font(:lang=en) # java stuff BuildRequires: ant BuildRequires: ant-apache-regexp BuildRequires: apache-commons-codec BuildRequires: apache-commons-lang BuildRequires: bsh BuildRequires: hsqldb BuildRequires: jakarta-commons-httpclient BuildRequires: java-devel BuildRequires: junit BuildRequires: pentaho-reporting-flow-engine BuildRequires: tomcat-servlet-3.0-api # fonts needed for unit tests BuildRequires: fonts-ttf-liberation # libreoffice metapackage requires all of the programs Requires: %{name}-base = %{version} Requires: %{name}-calc = %{version} Requires: %{name}-draw = %{version} Requires: %{name}-impress = %{version} Requires: %{name}-math = %{version} Suggests: %{name}-pdfimport Requires: %{name}-writer = %{version} Provides: openoffice.org = 1:%{version}-%{release} # Fedora patches Patch1: openoffice.org-2.0.2.rh188467.printingdefaults.patch Patch2: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch Patch3: openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch Patch4: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch Patch5: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch Patch6: libreoffice-installfix.patch # patches 7-11 are RHEL specific @RH/FC Patch12: 0001-do-not-build-LibreOffice_Test.patch Patch13: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch Patch14: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch Patch15: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch Patch16: 0001-Resolves-fdo-48835-application-menu-for-LibreOffice.patch Patch17: 0001-Make-charmap.cxx-compile-with-icu-4.4.patch Patch18: 0001-select-sheet-menu-as-a-right-click-popup-to-the-prev.patch Patch19: 0001-Resolves-rhbz-1013480-crash-in-EditLineList-operator.patch Patch20: 0001-Resolves-rhbz-1015281-crash-on-clicking-custom-anima.patch Patch21: 0001-Resolves-rhbz-996162-apparent-NULL-bullet-font.patch Patch22: 0001-fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch Patch23: 0001-WaE-Wstrict-overflow-assuming-signed-overflow-does-n.patch #Mageia Patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice %define ureinstdir %{baseinstdir}/ure %define sdkinstdir %{baseinstdir}/sdk %define fontname opensymbol %description LibreOffice is an Open Source, community-developed, office productivity suite. It includes the key desktop applications, such as a word processor, spreadsheet, presentation manager, formula editor and drawing program, with a user interface and feature set similar to other office suites. Sophisticated and flexible, LibreOffice also works transparently with a variety of file formats, including Microsoft Office File Formats. %package core Summary: Core modules for LibreOffice Group: Office/Utilities Requires: %{name}-%{fontname}-fonts = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} Requires: fonts-ttf-liberation Requires: fonts-ttf-dejavu Requires: hunspell Requires: hyphen >= 2.4 Suggests: hyphen-en Suggests: autocorr-en Suggests: hunspell-en Requires: libexttextcat Requires: %name-langpack = %version-%release Provides: openoffice.org-core = 1:%version-%release Provides: openoffice.org-common = 1:%version-%release Provides: openoffice.org-filter-binfilter = 1:%version-%release Provides: openoffice.org-help-en_US = 1:%version-%release Provides: openoffice.org-help-en_GB = 1:%version-%release Obsoletes: libreoffice-langpack-ms < 1:3.3.99.1 Obsoletes: libreoffice-langpack-ur < 1:3.3.99.1 Provides: libreoffice-style-tango = %{version}-%{release} Provides: libreoffice-style-oxygen = %{version}-%{release} Conflicts: %name-ure < 3.3.2.2-7 Obsoletes: libreoffice-binfilter < 4.0.0.0 Obsoletes: libreoffice-javafilter < 4.1.0.0 Obsoletes: autocorr-eu < 1:4.0.1.2 Obsoletes: libreoffice-testtools < 3.4.99.1 Conflicts: %name-gdb-debug-support < 3.6.0-0.beta2.1 %description core The shared core libraries and support files for LibreOffice. %package pyuno Summary: Python support for LibreOffice Group: Development/Python Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} Requires: python3 Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core Provides: openoffice.org-pyuno = 1:%version-%release Conflicts: libreoffice-core < %version %description pyuno Python bindings for the LibreOffice UNO component model. Allows scripts both external to LibreOffice and within the internal LibreOffice scripting framework to be written in python. %package base Summary: Database front-end for LibreOffice Group: Databases Requires: postgresql-jdbc Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-core = %{version}-%{release} Requires: %{name}-calc = %{version}-%{release} Suggests: %{name}-java-common = %{version}-%release Obsoletes: %{name}-report-builder < 1:4.1.0.0 Provides: openoffice.org-base = 1:%version-%release Provides: openoffice.org-style = 1:%version-%release Provides: openoffice.org-style-crystal = 1:%version-%release Provides: openoffice.org-style-oxygen = 1:%version-%release %description base GUI database front-end for LibreOffice. Allows creation and management of databases through a GUI. %package report-builder Summary: Create database reports from LibreOffice Group: Databases Requires: pentaho-reporting-flow-engine Requires: %{name}-base = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description report-builder Creates database reports from LibreOffice databases. The report builder can define group and page headers as well as group, page footers and calculation fields to accomplish complex database reports. %package bsh Summary: BeanShell support for LibreOffice Group: Development/Java Requires: bsh Requires: %{name}-core = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core Provides: openoffice.org-bsh < 1:%version-%release %description bsh Support BeanShell scripts in LibreOffice. %package rhino Summary: JavaScript support for LibreOffice Group: Development/Java Requires: %{name}-core = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description rhino Support JavaScript scripts in LibreOffice. %package wiki-publisher Summary: Create Wiki articles on MediaWiki servers with LibreOffice Group: Office/Utilities Requires: apache-commons-codec, jakarta-commons-httpclient Requires: apache-commons-lang, apache-commons-logging Requires: %{name}-writer = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description wiki-publisher The Wiki Publisher enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language. Publish your new and existing documents transparently with writer to a wiki page. %package nlpsolver Summary: Non-linear solver engine for LibreOffice Calc Group: Office/Utilities Requires: %{name}-calc = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description nlpsolver A non-linear solver engine for Calc as an alternative to the default linear programming model when more complex, nonlinear programming is required. %package ogltrans Summary: 3D OpenGL slide transitions for LibreOffice Group: Office/Utilities Requires: %{name}-impress = %{version}-%{release} Requires(pre): %{name}-core %description ogltrans OpenGL Transitions enable 3D slide transitions to be used in LibreOffice. Requires good quality 3D support for your graphics card for best experience. %package presentation-minimizer Summary: Shrink LibreOffice presentations Group: Publishing Requires: %{name}-impress = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description presentation-minimizer The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed, and data that is no longer needed will be removed. %package pdfimport Summary: PDF Importer for LibreOffice Draw Group: Office/Utilities Requires: %{name}-draw = %{version}-%{release} Requires(pre): %{name}-core Requires(post): %{name}-core Requires(preun): %{name}-core Requires(postun): %{name}-core %description pdfimport The PDF Importer imports PDF into drawing documents to preserve layout and enable basic editing of PDF documents. %package %{fontname}-fonts Summary: LibreOffice dingbats font Group: System/Fonts/True type Requires: fontpackages-filesystem BuildArch: noarch %description %{fontname}-fonts A dingbats font, OpenSymbol, suitable for use by LibreOffice for bullets and mathematical symbols. %package writer Summary: LibreOffice Word Processor Application Group: Office/Word processor Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} Provides: openoffice.org-writer = 1:%{version}-%{release} Provides: openoffice.org-writer2latex = 1:%{version}-%{release} Provides: openoffice.org-writer2xhtml = 1:%{version}-%{release} %description writer The LibreOffice Word Processor application. %package emailmerge Summary: Email mail-merge component for LibreOffice Group: Networking/Mail Requires: %{name}-writer = %{version}-%{release} Requires: %{name}-pyuno = %{version}-%{release} %description emailmerge Enables the LibreOffice writer module to mail-merge to email. %package calc Summary: LibreOffice Spreadsheet Application Group: Office/Spreadsheet Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} %description calc The LibreOffice Spreadsheet application. %package draw Summary: LibreOffice Drawing Application Group: Graphics/Editors and Converters Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-pdfimport = %{version}-%{release} Requires: %{name}-graphicfilter = %{version}-%{release} provides: openoffice.org-draw = 1:%{version}-%{release} %description draw The LibreOffice Drawing Application. %package impress Summary: LibreOffice Presentation Application Group: Office/Utilities Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-ogltrans = %{version}-%{release} %rename %{name}-presenter-screen = %{version}-%{release} Provides: openoffice.org-impress = 1:%{version}-%{release} %description impress The LibreOffice Presentation Application. %package math Summary: LibreOffice Equation Editor Application Group: Sciences/Mathematics Requires: %{name}-core = %{version}-%{release} Requires: %{name}-ure = %{version}-%{release} %description math The LibreOffice Equation Editor Application. %package graphicfilter Summary: LibreOffice Extra Graphic filters Group: Office/Utilities Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-core = %{version}-%{release} %description graphicfilter The graphicfilter module for LibreOffice provides graphic filters, e.g. svg and flash filters. %package xsltfilter Summary: Optional xsltfilter module for LibreOffice Group: Office/Utilities Requires: %{name}-core = %{version}-%{release} %description xsltfilter The xsltfilter module for LibreOffice, provides additional docbook and xhtml export transforms. Install this to enable docbook export. %package postgresql Summary: PostgreSQL connector for LibreOffice Group: Office/Utilities Requires: %{name}-base = %{version}-%{release} Requires: postgresql-libs %description postgresql A PostgreSQL connector for the database front-end for LibreOffice. Allows creation and management of PostgreSQL databases through a GUI. %package ure Summary: UNO Runtime Environment Group: Development/Other Requires: unzip Suggests: %name-java-common = %version-%release Conflicts: libreoffice-core <= 3.3.2.2-5 %description ure UNO is the component model of LibreOffice. UNO offers interoperability between programming languages, other components models and hardware architectures, either in process or over process boundaries, in the Intranet as well as in the Internet. UNO components may be implemented in and accessed from any programming language for which a UNO implementation (AKA language binding) and an appropriate bridge or adapter exists %package java-common Group: Office/Utilities Summary: LibreOffice office suite Java support arch. independent files Requires: %{name}-core = %{version}-%{release} #Requires: %{name}-common = %{version}-%{release} Requires: jre Conflicts: %name-core < 3.3.2.2-8 Provides: openoffice.org-java-common = 1:%version-%release %description java-common LibreOffice is a full-featured office productivity suite that provides a near drop-in replacement for Microsoft(R) Office. This package contains the architecture-independent files of the Java support for Libreoffice (Java classes, scripts, config snippets). Also contains the Libreoffice Office Bean for embedding Libreoffice in custom Java applications. %package sdk Summary: Software Development Kit for LibreOffice Group: Development/Other Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-core = %{version}-%{release} Requires: unzip, java-devel %description sdk The LibreOffice SDK is an add-on for the LibreOffice office suite. It provides the necessary tools for programming using the LibreOffice APIs and for creating extensions (UNO components) for LibreOffice. To set the build environment for building against the sdk use %{sdkinstdir}/setsdkenv_unix.sh. %package sdk-doc Summary: Software Development Kit documentation for LibreOffice Group: Development/Other Requires: %{name}-sdk = %{version}-%{release} %description sdk-doc This provides documentation for programming using the LibreOffice APIs and examples of creating extensions (UNO components) for LibreOffice. %package headless Summary: LibreOffice Headless plug-in Group: Development/Other Requires: %{name}-ure = %{version}-%{release} Requires: %{name}-core = %{version}-%{release} %description headless A plug-in for LibreOffice that enables it to function without an X server. It implements the -headless command line option and allows LibreOffice to be used as a backend server for e.g. document conversion. %package glade Summary: Support for creating LibreOffice dialogs in glade Group: Development/GNOME and GTK+ Requires: %{name}-core = %{version}-%{release} %description glade %{name}-glade contains a catalog of LibreOffice-specific widgets for glade and ui-previewer tool to check the visual appearance of dialogs. %package kde Summary: LibreOffice KDE integration plug-in Group: Graphical desktop/KDE Requires: %{name}-core = %{version}-%{release} Provides: openoffice.org-kde4 = 1:%version-%release %description kde A plug-in for LibreOffice that enables integration into the KDE desktop environment. %if 0%{?_enable_debug_packages} %define debug_package %{nil} %global __debug_package 1 %package debuginfo Summary: Debug information for package %{name} Group: Development/Debug AutoReqProv: 0 Requires: libreoffice-core = %{version}-%{release} Requires: libreoffice-gdb-debug-support = %{version}-%{release} %description debuginfo This package provides debug information for package %{name}. Debug information is useful when developing applications that use this package or when debugging this package. %files debuginfo -f debugfiles.list %package gdb-debug-support Summary: Additional support for debugging with gdb Group: Development/Other Requires: gdb AutoReqProv: 0 %description gdb-debug-support This package provides gdb pretty printers for package %{name}. %files gdb-debug-support %{_datadir}/gdb/auto-load%{baseinstdir} %{_datadir}/libreoffice/gdb %endif %define _langpack_common() \ %{baseinstdir}/program/resource/*%{1}.res \ %{baseinstdir}/share/config/soffice.cfg/modules/*/ui/res/%{1} \ %{baseinstdir}/share/config/soffice.cfg/*/ui/res/%{1} \ %{baseinstdir}/share/template/%{1} \ %{baseinstdir}/share/registry/Langpack-%{1}.xcd \ %{baseinstdir}/share/registry/res/registry_%{1}.xcd \ %{baseinstdir}/share/registry/res/fcfg_langpack_%{1}.xcd \ %{nil} # Defines a language pack subpackage. # # It's necessary to define language code (-l) and language name (-n). # Additionally, it's possible # * to require autocorr, hunspell, hyphen or mythes package or font for # given language, # * to obsolete openoffice.org-langpack package, # * to provide libreoffice-langpack-loc package, where loc is glibc # locale--this is necessary for urpmi to pick it automatically, # * to require other, unrelated, packages, # * to specify file serving as file list. # For these, lower case character argument takes an argument specifying # language, upper case character argument uses language from -l. # # All remaining arguments are considered to be files and added to the file # list. # # Aa: autocorr dependency # c: additional config file (just the name stem) # E the package does not contain any files (i.e., has empty filelist) # Ff: font language dependency # Hh: hunspell dependency # i: additional language added to this package # L: internal (LibreOffice) language code, used in file names # l: language code, e.g., cs # Mm: mythes dependency # n: language name, e.g., Czech # Oo: Obsoletes: of openoffice.org-langpack # Vv: Very archaic Obsoletes: of openoffice.org-langpack # Ww: Archaic Obsoletes: of openoffice.org2-langpack # p: Provides: of libreoffice-langpack # r: comma-separated list of additional requires # S:s: script classification (cjk, ctl). -S is only a marker, as it does # not add any .xcd into the package (the file does not exist for at # least one CTL-using locale, si) # T has help files # u: requires locales-XX (w/o, we requires the proper locales-XX automatically) (MGA) # Xx: has autotext definitions # Yy: hyphen dependency # # Example: # libreoffice-langpack-cs: langpack for Czech lang. requiring hyphen-cs, # autocorr-cs, mythes-cs-CZ and suitable font, obsoleting # openoffice.org-langpack-cs_CZ: # %%langpack -l cs -n Czech -H -A -m cs-CZ # b de g jk q tu z BCD G IJK N PQR Z0123456789 %define langpack(Aa:c:EFf:Hh:i:L:l:Mm:n:p:Oo:r:S:s:TVv:u:Ww:Xx:Yy:) \ %define project LibreOffice \ %define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \ %define _langpack_lang %{-L:%{-L*}}%{!-L:%{lang}} \ %define pkgname langpack-%{lang} \ %define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \ \ %global langpack_langs %{langpack_langs} %{_langpack_lang} %{-i:%{-i*}} \ \ %package %{pkgname} \ Summary: %{langname} language pack for %{project} \ Group: System/Internationalization \ Requires: %{name}-core = %{version}-%{release} \ Provides: %name-langpack = %version-%release \ %{-a:Requires: autocorr-%{-a*}}%{!-a:%{-A:Requires: autocorr-%{lang}}} \ %{-f:Requires: font(:lang=%{-f*})}%{!-f:%{-F:Requires: font(:lang=%{lang})}} \ %{-h:Requires: hunspell-%{-h*}}%{!-h:%{-H:Requires: hunspell-%{lang}}} \ %{-m:Requires: mythes-%{-m*}}%{!-m:%{-M:Requires: mythes-%{lang}}} \ %{-u:Requires: locales-%{-u*}}%{!-u:Requires: locales-%{lang}} \ %{-y:Requires: hyphen-%{-y*}}%{!-y:%{-Y:Requires: hyphen-%{lang}}} \ %{-r:Requires: %{-r*}} \ %define obs openoffice.org-langpack \ %define obsv 1:3.3.1 \ %define aobs openoffice.org2-langpack \ %define aobsv 1:3.0.0 \ %define vaobs openoffice.org-langpack \ %define vaobsv 1:2.0.3 \ %{-o:Obsoletes: %{obs}-%{-o*} < %{obsv}}%{!-o:%{-O:Obsoletes: %{obs}-%{lang} < %{obsv}}} \ #%{-w:Obsoletes: %{aobs}-%{-x*} < %{aobsv}}%{!-x:%{-W:Obsoletes: %{aobs}-%{lang} < %{aobsv}}} \ %{-v:Obsoletes: %{vaobs}-%{-v*} < %{vaobsv}}%{!-v:%{-V:Obsoletes: %{vaobs}-%{lang} < %{vaobsv}}} \ %{-p:Provides: %{name}-langpack-%{-p*}} \ \ %description %{pkgname} \ Provides additional %{langname} translations and resources for %{project}. \ \ %files %{pkgname} \ %{!-E: \ %define autotextdir %{baseinstdir}/share/autotext \ %{expand:%%_langpack_common %{_langpack_lang}} \ %{-x:%{autotextdir}/%{-x*}}%{!-x:%{-X:%{autotextdir}/%{_langpack_lang}}} \ %{-c:%{baseinstdir}/share/registry/%{-c*}.xcd} \ %{-s:%{baseinstdir}/share/registry/%{-s*}_%{_langpack_lang}.xcd} \ %{-T: \ %docdir %{baseinstdir}/help/%{_langpack_lang} \ %{baseinstdir}/help/%{_langpack_lang} \ } \ %{-i:%{expand:%%_langpack_common %{-i*}}} \ } \ %{nil} # Defines an auto-correction subpackage. # # i: add autocorrections from additional language # l: language code # n: language name # L the filename does not contain country code # # All remaining arguments are considered to be files and added to the file # list. %define autocorr(i:Ll:n:) \ %define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \ %define pkgname autocorr-%{lang} \ %define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \ \ %package -n %{pkgname} \ Summary: %{langname} auto-correction rules \ Group: Text tools \ Requires: locales-%{lang} \ BuildArch: noarch \ \ %description -n %{pkgname} \ Rules for auto-correcting common %{langname} typing errors. \ \ %files -n %{pkgname} \ %doc solver/unxlng*/bin/ure/LICENSE \ %dir %{_datadir}/autocorr \ %{-L:%{_datadir}/autocorr/acor_%{lang}.dat} \ %{!-L:%{_datadir}/autocorr/acor_%{lang}-*.dat} \ %{-i:%{_datadir}/autocorr/acor_%{-i*}-*.dat} \ %{nil} %if %{with langpacks} %langpack -l af -n Afrikaans -F -H -Y -A -o af_ZA -V -w af_ZA %langpack -l ar -n Arabic -F -H -s ctl -O -W %langpack -l as -n Assamese -F -H -Y -o as_IN -w as_IN %langpack -l bg -n Bulgarian -F -H -Y -M -A -T -X -o bg_BG -V -w bg_BG %langpack -l bn -n Bengali -F -H -Y -T -O -v bn_IN -W %langpack -l br -n Breton -F -H -T %langpack -l ca -n Catalan -F -H -Y -M -A -T -o ca_ES -V -w ca_ES %langpack -l cs -n Czech -F -H -Y -M -A -T -X -o cs_CZ -V -w cs_CZ %langpack -l cy -n Welsh -F -H -Y -o cy_GB -V -w cy_GB %langpack -l da -n Danish -F -H -Y -M -A -T -X -o da_DK -V -w da_DK %langpack -l de -n German -F -H -Y -M -A -T -X -O -W %langpack -l dz -n Dzongkha -F -s ctl -T -O %langpack -l el -n Greek -F -H -Y -M -T -o el_GR -V -w el_GR %langpack -l en -n English -F -H -Y -M -A -E -L en-US -O %langpack -l es -n Spanish -F -H -Y -M -A -T -X -O -W %langpack -l et -n Estonian -F -H -Y -T -o et_EE -V -w et_EE %langpack -l eu -n Basque -F -H -Y -T -o eu_ES -V -w eu_ES %langpack -l fa -n Farsi -A -H -Y -s ctl %langpack -l fi -n Finnish -F -r libreoffice-voikko -A -T -o fi_FI -V -w fi_FI %langpack -l fr -n French -F -H -Y -M -A -T -X -O -W %langpack -l ga -n Irish -F -H -Y -M -A -o ga_IE -w ga_IE %langpack -l gl -n Galician -F -H -Y -T -o gl_ES -V -w gl_ES %langpack -l gu -n Gujarati -F -H -Y -s ctl -o gu_IN -w gu_IN %langpack -l he -n Hebrew -F -H -s ctl -o he_IL -V -w he_IL %langpack -l hi -n Hindi -F -H -Y -s ctl -T -o hi_IN -v hi-IN -w hi_IN %langpack -l hr -n Croatian -F -H -Y -A -o hr_HR -V -w hr_HR %langpack -l hu -n Hungarian -F -H -Y -M -A -T -X -o hu_HU -V -w hu_HU %langpack -l it -n Italian -F -H -Y -M -A -T -X -O -W %langpack -l ja -n Japanese -F -A -s cjk -T -X -o ja_JP -V -w ja_JP %langpack -l kk -n Kazakh -F -H %langpack -l kn -n Kannada -F -H -Y -o kn_IN -w ka_IN %langpack -l ko -n Korean -F -H -A -s cjk -T -c korea -X -o ko_KR -V -w ko_KR %langpack -l lt -n Lithuanian -F -H -Y -A -o lt_LT -V -w lt_LT %langpack -l lv -n Latvian -F -H -Y -M %langpack -l mai -n Maithili -F -o mai_IN %langpack -l ml -n Malayalam -F -H -Y -o ml_IN -w ml_IN %langpack -l mr -n Marathi -F -H -Y -o mr_IN -w mr_IN %langpack -l nb -n Bokmal -F -H -Y -M -T -o nb_NO -V -w nb_NO -u no %langpack -l nl -n Dutch -F -H -Y -M -A -T -X -O -W %langpack -l nn -n Nynorsk -F -H -Y -M -T -o nn_NO -V -w nn_NO -u no %define langpack_lang Southern Ndebele %langpack -l nr -n %{langpack_lang} -F -H -o nr_ZA %define langpack_lang Northern Sotho %langpack -l nso -n %{langpack_lang} -F -H -o nso_ZA -w nso_ZA %langpack -l or -n Oriya -F -H -Y -s ctl -o or_IN -w or_IN %langpack -l pa -n Punjabi -F -H -Y -s ctl -L pa-IN -O -v pa_IN -w pa_IN %langpack -l pl -n Polish -F -H -Y -M -A -T -X -o pl_PL -V -w pl_PL %define langpack_lang Brazilian Portuguese %langpack -l pt_BR -n %{langpack_lang} -f pt -h pt -y pt -m pt -a pt -p pt_BR -T -X -o pt_BR -V -w pt_BR -L pt-BR -u pt %langpack -l pt -n Portuguese -f pt -h pt -y pt -m pt -a pt -p pt_PT -T -L pt -X -u pt -o pt_PT -v pt -W %langpack -l ro -n Romanian -A -F -H -Y -M -O %langpack -l ru -n Russian -F -H -Y -M -A -T -X -O -W %langpack -l si -n Sinhalese -F -H -S ctl -T -O %langpack -l sk -n Slovak -F -H -Y -M -A -T -X -o sk_SK -V -w sk_SK %langpack -l sl -n Slovenian -F -H -Y -M -A -T -X -o sl_SI -V -w sl_SI %{baseinstdir}/share/wordbook/sl.dic %langpack -l sr -n Serbian -F -H -Y -A -i sh -O -v sr_CS -w sr_CS %langpack -l ss -n Swati -F -H -o ss_ZA %define langpack_lang Southern Sotho %langpack -l st -n %{langpack_lang} -F -H -o st_ZA %langpack -l sv -n Swedish -F -H -Y -M -A -T -X -O -W %langpack -l ta -n Tamil -F -H -Y -s ctl -o ta_IN -w ta_IN %langpack -l te -n Telugu -F -H -Y -o te_IN -w te_IN %langpack -l th -n Thai -F -H -s ctl -c ctlseqcheck_th -o th_TH -V -w th_TH %langpack -l tn -n Tswana -F -H -o tn_ZA -V -w tn_ZA %langpack -l tr -n Turkish -F -A -T -X -o tr_TR -V -W %langpack -l ts -n Tsonga -F -H -o ts_ZA -V -w ts_ZA %langpack -l uk -n Ukrainian -F -H -Y -M -T -O %langpack -l ve -n Venda -F -H -o ve_ZA %langpack -l xh -n Xhosa -F -H -o xh_ZA %define langpack_lang Simplified Chinese %langpack -l zh_CN -n %{langpack_lang} -f zh-cn -a zh -p zh_CN -s cjk -T -L zh-CN -X -o zh_CN -v zh-CN -w zh_CN -u zh %define langpack_lang Traditional Chinese %langpack -l zh_TW -n %{langpack_lang} -f zh-tw -a zh -p zh_TW -s cjk -T -L zh-TW -X -o zh_TW -v zh-TW -w zh_TW -u zh %langpack -l zu -n Zulu -F -H -Y -o zu_ZA -V -w zu_ZA %undefine langpack_lang %endif %autocorr -l en -n English %if %{with langpacks} %autocorr -l af -n Afrikaans %autocorr -l bg -n Bulgarian %autocorr -l ca -n Catalan -L %autocorr -l cs -n Czech %autocorr -l da -n Danish %autocorr -l de -n German %autocorr -l es -n Spanish %autocorr -l fa -n Farsi %autocorr -l fi -n Finnish %autocorr -l fr -n French %autocorr -l ga -n Irish %autocorr -l hr -n Croatian %autocorr -l hu -n Hungarian %autocorr -l is -n Icelandic %autocorr -l it -n Italian %autocorr -l ja -n Japanese %autocorr -l ko -n Korean %autocorr -l lb -n Luxembourgish %autocorr -l lt -n Lithuanian %autocorr -l mn -n Mongolian %autocorr -l nl -n Dutch %autocorr -l pl -n Polish %autocorr -l pt -n Portuguese %autocorr -l ro -n Romanian %autocorr -l ru -n Russian %autocorr -l sk -n Slovak %autocorr -l sl -n Slovenian #rhbz#452379 clump serbian autocorrections together %autocorr -l sr -n Serbian -i sh %autocorr -l sv -n Swedish %autocorr -l tr -n Turkish %autocorr -l vi -n Vietnamese %autocorr -l zh -n Chinese %endif %define make_autocorr_aliases(l:) \ %{?-l: \ for lang in %{*}; do \ ln -sf acor_%{-l*}.dat acor_$lang.dat \ done \ } \ %{!?-l:%{error:-l must be present}} %prep %setup -q -n %{name}-%{version}%{?libo_prerelease} -b 1 -b 2 rm -rf git-hooks */git-hooks #Customize Palette to remove Sun colours and add Red Hat colours #TODO: have and add mageia colours (head -n -1 extras/source/palettes/standard.soc && \ echo -e ' ' && \ tail -n 1 extras/source/palettes/standard.soc) > mageia.soc mv -f mageia.soc extras/source/palettes/standard.soc %patch1 -p1 %patch2 -p1 -b .ooo86080.unopkg.bodge.patch %patch3 -p1 -b .ooo88341.sc.verticalboxes.patch %patch4 -p1 -b .oooXXXXX.solenv.allowmissing.patch %patch5 -p1 -b .ooo101274.opening-a-directory.patch %patch6 -p1 -b .libreoffice-installfix.patch # patches 7-11 are RHEL specific @RH/FC %patch12 -p1 -b .do-not-build-LibreOffice_Test.patch %patch13 -p1 -b .rhbz-968892-force-render-full-grapheme-with.patch %patch14 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch %patch15 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch %patch16 -p1 -b .fdo-48835-application-menu-for-LibreOffice.patch %patch17 -p1 -b .Make-charmap.cxx-compile-with-icu-4.4.patch %patch18 -p1 -b .select-sheet-menu-as-a-right-click-popup-to-the-prev.patch %patch19 -p1 -b .rhbz-1013480-crash-in-EditLineList-operator.patch %patch20 -p1 -b .rhbz-1015281-crash-on-clicking-custom-anima.patch %patch21 -p1 -b .rhbz-996162-apparent-NULL-bullet-font.patch %patch22 -p1 -b .fdo-70201-sw-eliminate-no-extent-RSID-only-AUTOFMT-h.patch %patch23 -p1 -b .WaE-Wstrict-overflow-assuming-signed-overflow-does-n.patch # TODO: check this # these are horribly incomplete--empty translations and copied english # strings with spattering of translated strings rm -rf translations/source/{gu,he,hr}/helpcontent2 %build echo build start time is `date`, diskspace: `df -h . | tail -n 1` echo building localizations: %{langpack_langs} # path to external tarballs EXTSRCDIR=`dirname %{SOURCE0}` # KDE bits export QT4DIR=%{qt4dir} export KDE4DIR=%{_kde_prefix} export PATH=$QT4DIR/bin:$PATH #use the RPM_OPT_FLAGS but remove the OOo overridden ones for i in $RPM_OPT_FLAGS; do case "$i" in -pipe|-Wall|-g|-fexceptions) continue;; esac ARCH_FLAGS="$ARCH_FLAGS $i" done export ARCH_FLAGS # Do not compile LO with -fomit-frame-pointer flags, or it will crash at start. export CFLAGS="$(echo $ARCH_FLAGS | sed -e 's/-fomit-frame-pointer//')" export CXXFLAGS="$(echo $ARCH_FLAGS | sed -e 's/-fomit-frame-pointer//')" export FFLAGS="$(echo $FFLAGS | sed -e 's/-fomit-frame-pointer//')" %define distrooptions --without-system-hsqldb --enable-kde4 --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes --with-servlet-api-jar=/usr/share/java/tomcat-servlet-api.jar %if %{with langpacks} %define with_lang --with-lang='%{langpack_langs}' %endif aclocal -I m4 autoconf # avoid running autogen.sh on make touch autogen.lastrun %configure2_5x \ %vendoroption \ %{?_smp_mflags:--with-parallelism="`getconf _NPROCESSORS_ONLN`"} \ %{?with_lang} \ --disable-fetch-external \ --disable-gnome-vfs \ --enable-dbus \ --enable-evolution2 \ --enable-ext-nlpsolver \ --enable-ext-presenter-minimizer \ --enable-ext-wiki-publisher \ --enable-lockdown \ --enable-release-build \ --enable-scripting-beanshell \ --enable-scripting-javascript \ --enable-symbols \ --enable-vba \ --with-build-version="%{version}-%{release}" \ --with-external-dict-dir=/usr/share/myspell \ --with-external-tar="$EXTSRCDIR" \ --with-help \ --with-system-dicts \ --with-system-libs \ --without-afms \ --without-fonts \ --without-ppds \ --without-system-npapi-headers \ %if %{build_gtk3} --enable-gtk3 \ %endif %if 0%{?system_boost} %else --without-system-boost \ %endif %if %with_mergedlibs --enable-mergelibs \ %endif %{distrooptions} make VERBOSE=true #generate the icons and mime type stuff export DESTDIR=../output export KDEMAINDIR=/usr export GNOMEDIR=/usr export GNOME_MIME_THEME=hicolor # TODO use empty variables? Should make the renaming hacks in %%install # unnecessary. . ./bin/get_config_variables PRODUCTVERSIONSHORT PRODUCTVERSION WORKDIR cd $WORKDIR/CustomTarget/sysui/share/libreoffice ./create_tree.sh echo build end time is `date`, diskspace: `df -h . | tail -n 1` %install # TODO investigate use of make distro-pack-install #figure out the icon version . ./bin/get_config_variables PRODUCTVERSIONSHORT PRODUCTVERSION SRCDIR WORKDIR export PRODUCTVERSIONSHORT PRODUCTVERSION # installation mkdir -p $RPM_BUILD_ROOT/%{instdir} if ! make instsetoo_native PKGFORMAT=installed EPM=not-used-but-must-be-set; then echo - ---dump log start--- cat $ WORKDIR/installation/LibreOffice/installed/logging/en-US/log_*_en-US.log echo - ---dump log end--- echo - ---dump log start -- SDK--- cat $ WORKDIR/installation/LibreOffice_SDK/installed/logging/en-US/log_*_en-US.log echo - ---dump log end -- SDK--- echo - ---dump log start -- languagepacks--- cat $ WORKDIR/installation/LibreOffice_languagepack/installed/logging/en-US/log_*_en-US.log echo - ---dump log end -- languagepacks--- exit 1 fi mkdir -p $RPM_BUILD_ROOT/%{baseinstdir} mv $WORKDIR/installation/LibreOffice/installed/install/en-US/* $RPM_BUILD_ROOT/%{baseinstdir} %if %{with langpacks} for langpack in $WORKDIR/installation/LibreOffice_languagepack/installed/install/*; do [ `basename $langpack` = log ] && continue cp -rp $langpack/* $RPM_BUILD_ROOT/%{baseinstdir} rm -rf $langpack done %endif mv $WORKDIR/installation/LibreOffice_SDK/installed/install/en-US/sdk $RPM_BUILD_ROOT/%{sdkinstdir} chmod -R +w $RPM_BUILD_ROOT/%{baseinstdir} rm -f $RPM_BUILD_ROOT/%{baseinstdir}/program/classes/smoketest.jar # postprocessing and tweaks # The installer currently sets UserInstallation to # $ORIGIN/../libreoffice/4, which is of course total nonsense. Because I # have no inclination to crawl through mountains of perl code to figure out # where it comes from, I am just going to replace it by a sensible # value here. sed -i -e '/UserInstallation/s@\$ORIGIN/..@$SYSUSERCONFIG@' $RPM_BUILD_ROOT/%{baseinstdir}/program/bootstraprc #configure sdk pushd $RPM_BUILD_ROOT/%{sdkinstdir} sed -e "s,@OO_SDK_NAME@,sdk," \ -e "s,@OO_SDK_HOME@,%{sdkinstdir}," \ -e "s,@OFFICE_HOME@,%{baseinstdir}," \ -e "s,@OO_SDK_URE_HOME@,%{ureinstdir}," \ -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \ -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \ -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \ -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \ -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \ -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \ -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \ setsdkenv_unix.sh.in > setsdkenv_unix.sh chmod 755 setsdkenv_unix.sh # we don't want to install the input file rm -f setsdkenv_unix.sh.in # TODO: is this still necessary? #fix permissions find examples -type f -exec chmod -x {} \; popd #ensure a template dir for each lang pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/template for I in %{langpack_langs}; do mkdir -p $I done popd #Set some aliases to canonical autocorrect language files for locales with matching languages pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/autocorr %make_autocorr_aliases -l en-GB en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT %make_autocorr_aliases -l en-US en-PH #en-ZA exists and has a good autocorrect file with two or three extras that make sense for #neighbouring english speaking territories %make_autocorr_aliases -l en-ZA en-NA en-ZW %if %{with langpacks} %make_autocorr_aliases -l af-ZA af-NA %make_autocorr_aliases -l de-DE de-AT de-BE de-CH de-LI de-LU %make_autocorr_aliases -l es-ES es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE %make_autocorr_aliases -l fr-FR fr-BE fr-CA fr-CH fr-LU fr-MC %make_autocorr_aliases -l it-IT it-CH %make_autocorr_aliases -l nl-NL nl-AW %make_autocorr_aliases -l sv-SE sv-FI %else rm -f acor_[a-df-z]*.dat acor_e[su]*.dat %endif popd #rhbz#484055 make these shared across multiple applications mkdir -p $RPM_BUILD_ROOT/%{_datadir} mv -f $RPM_BUILD_ROOT/%{baseinstdir}/share/autocorr $RPM_BUILD_ROOT/%{_datadir}/autocorr chmod 755 $RPM_BUILD_ROOT/%{_datadir}/autocorr #remove it in case we didn't build with gcj rm -f $RPM_BUILD_ROOT/%{baseinstdir}/program/classes/sandbox.jar #remove dummy .dat files rm -f $RPM_BUILD_ROOT/%{baseinstdir}/program/root?.dat #set standard permissions for rpmlint find $RPM_BUILD_ROOT/%{baseinstdir} -exec chmod +w {} \; find $RPM_BUILD_ROOT/%{baseinstdir} -type d -exec chmod 0755 {} \; # move python bits into site-packages mkdir -p $RPM_BUILD_ROOT/%{python3_sitearch} pushd $RPM_BUILD_ROOT/%{python3_sitearch} echo "import sys, os" > uno.py echo "sys.path.append('%{baseinstdir}/program')" >> uno.py echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py cat $RPM_BUILD_ROOT/%{baseinstdir}/program/uno.py >> uno.py rm -f $RPM_BUILD_ROOT/%{baseinstdir}/program/uno.py* mv -f $RPM_BUILD_ROOT/%{baseinstdir}/program/unohelper.py* . popd # rhbz#477435 package opensymbol separately pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/fonts/truetype install -d -m 0755 %{buildroot}%{_fontdir} install -p -m 0644 *.ttf %{buildroot}%{_fontdir} popd rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/share/fonts #ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs #have snuck through pic=0 executable=0 for foo in `find $RPM_BUILD_ROOT/%{instdir} -name "*" -exec file {} \;| grep ": ELF" | cut -d: -f 1` ; do chmod +wx $foo ls -asl $foo result=`readelf -d $foo | grep TEXTREL` || true if [ "$result" != "" ]; then echo "TEXTREL Warning: $foo is b0rked (-fpic missing)" pic=1 fi result=`readelf -l $foo | grep GNU_STACK | grep RWE` || true if [ "$result" != "" ]; then echo "GNU_STACK Warning: $foo is b0rked (-noexecstack missing)" executable=1 fi done if [ $pic == 1 ]; then false; fi if [ $executable == 1 ]; then false; fi #make up some /usr/bin scripts mkdir -p $RPM_BUILD_ROOT/%{_bindir} echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooffice echo exec libreoffice \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooffice chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooffice echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc echo exec libreoffice --view \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oowriter echo exec libreoffice --writer \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oowriter chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oowriter echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oocalc echo exec libreoffice --calc \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oocalc chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oocalc echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooimpress echo exec libreoffice --impress \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooimpress chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooimpress echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oodraw echo exec libreoffice --draw \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oodraw chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oodraw echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oomath echo exec libreoffice --math \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oomath chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oomath echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oobase echo exec libreoffice --base \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oobase chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oobase cp -f %{SOURCE4} $RPM_BUILD_ROOT/%{_bindir}/unopkg sed -i -e "s/LAUNCHER/unopkg/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg chmod a+x $RPM_BUILD_ROOT/%{_bindir}/unopkg cp -f %{SOURCE4} $RPM_BUILD_ROOT/%{_bindir}/libreoffice sed -i -e "s/LAUNCHER/soffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice chmod a+x $RPM_BUILD_ROOT/%{_bindir}/libreoffice pushd $RPM_BUILD_ROOT/%{_bindir} # rhbz#499474 provide a /usr/bin/soffice for .recently-used.xbel ln -s %{baseinstdir}/program/soffice soffice # rhbz#499474 provide a /usr/bin/openoffice.org for backwards compat ln -s libreoffice openoffice.org popd pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/xdg/ chmod u+w *.desktop rm -rf printeradmin.desktop ICONVERSION=`echo $PRODUCTVERSION | sed -e 's/\.//'` for file in *.desktop; do # rhbz#156677 remove the version from Name= # rhbz#156067 don't version the icons sed -i -e "s/ *$PRODUCTVERSION//g" \ -e "s/$ICONVERSION//g" \ -e "s/$PRODUCTVERSIONSHORT//g" \ $file done for app in base calc draw impress math writer; do echo "TryExec=oo$app" >> $app.desktop done # relocate the .desktop and icon files mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications for app in base calc draw impress math startcenter writer xsltfilter; do desktop-file-validate $app.desktop cp -p $app.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-$app.desktop done popd # desktop files desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --add-mime-type="application/vnd.ms-works;application/x-msworks-wp;zz-application/zz-winassoc-wps" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*writer*desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*calc*desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*draw*desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*impress*desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*math*desktop %if 0 desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*web*desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="Office" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*template*desktop %endif desktop-file-install --vendor="" \ --remove-category="X-MandrivaLinux-MoreApplications-Databases" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/libreoffice-base.desktop %if 0 ## MS OOXML (#36465) desktop-file-install \ --add-mime-type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" \ --add-mime-type="application/vnd.ms-word.document.macroEnabled.12" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/writer*desktop desktop-file-install \ --add-mime-type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" \ --add-mime-type="application/vnd.ms-excel.sheet.macroEnabled.12" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/calc*desktop desktop-file-install \ --add-mime-type="application/vnd.openxmlformats-officedocument.presentationml.presentation" \ --add-mime-type="application/vnd.ms-powerpoint.presentation.macroEnabled.12" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/impress*desktop %endif for app in base calc draw impress math writer startcenter ; do sed -i -e "s/Icon=$app/Icon=libreoffice-$app/g" $RPM_BUILD_ROOT%_datadir/applications/%name-${app}.desktop done pushd $WORKDIR/CustomTarget/sysui/share/output/usr/share #get rid of the gnome icons and other unneeded files rm -rf icons/gnome applications application-registry #relocate the rest of them # rhbz#901346 512x512 icons are not used by anything for icon in `find icons -path '*/512x512' -prune -o -type f -print`; do mkdir -p $RPM_BUILD_ROOT/%{_datadir}/`dirname $icon` cp -p $icon $RPM_BUILD_ROOT/%{_datadir}/`echo $icon | sed -e s@libreoffice$ICONVERSION-@libreoffice-@ | sed -e s@libreoffice$PRODUCTVERSION-@libreoffice-@` done mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime-info cp -p mime-info/libreoffice$PRODUCTVERSION.keys $RPM_BUILD_ROOT/%{_datadir}/mime-info/libreoffice.keys cp -p mime-info/libreoffice$PRODUCTVERSION.mime $RPM_BUILD_ROOT/%{_datadir}/mime-info/libreoffice.mime #add our mime-types, e.g. for .oxt extensions mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime/packages cp -p mime/packages/libreoffice$PRODUCTVERSION.xml $RPM_BUILD_ROOT/%{_datadir}/mime/packages/libreoffice.xml popd rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/readmes rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/licenses mkdir -p $RPM_BUILD_ROOT/%{baseinstdir}/share/psprint/driver cp -p psprint_config/configuration/ppds/SGENPRT.PS $RPM_BUILD_ROOT/%{baseinstdir}/share/psprint/driver/SGENPRT.PS # rhbz#452385 to auto have postgres in classpath if subsequently installed sed -i -e "s#URE_MORE_JAVA_CLASSPATH_URLS.*#& file:///usr/share/java/postgresql-jdbc.jar#" $RPM_BUILD_ROOT/%{baseinstdir}/program/fundamentalrc # Br translation doesn't have any help # Better use fr ones for now ( and check if this is still valid for next update ) pushd %buildroot%_libdir/libreoffice/help ln -s fr br popd # move glade catalog to system glade dir mkdir -p $RPM_BUILD_ROOT/%{_datadir}/glade3/catalogs mv $RPM_BUILD_ROOT/%{baseinstdir}/share/glade/libreoffice-catalog.xml $RPM_BUILD_ROOT/%{_datadir}/glade3/catalogs %if 0%{?_enable_debug_packages} export DESTDIR=$RPM_BUILD_ROOT make cmd cmd="install-gdb-printers -a %{_datadir}/gdb/auto-load%{baseinstdir} -c -i %{baseinstdir} -p %{_datadir}/libreoffice/gdb" %endif cat> $RPM_BUILD_ROOT%_bindir/libreoffice-gtk3 <