File libreoffice-filters.spec of Package libreoffice-filters
#
# spec file for package libreoffice-filters
#
# Copyright (c) 2011 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-filters
Version: 3.3.1.2
Release: 2.<RELEASE2>
%define piece filters
%define ooo_build_version 3.3.1.2
%define ooo_piece_version 3.3.1.2
%define ooo_sourcedirname libreoffice-build-%ooo_piece_version
%define ooo_prefix %_libdir
%define ooo_home libreoffice
%define ooo_basis_dir basis3.3
%if 0%{?meego_version}
# the manifest file must be in the right place; registration does not work with some repacked jars
%define __jar_repack %{nil}
%endif
#!BuildIgnore: 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 libjpeg-devel libxml2-devel libxslt-devel mono-devel neon-devel pam-devel perl-Archive-Zip perl-Compress-Zlib python-devel recode unixODBC-devel unzip xml-commons-apis zip
############################
# basic stuff
%if 0%{?suse_version}
BuildRequires: db-devel krb5 openldap2-devel xorg-x11
%endif
%if 0%{?meego_version}
BuildRequires: db4-devel krb5-devel openldap-devel
BuildRequires: libreoffice-artwork-devel = %version
BuildRequires: libreoffice-libs-core-devel = %version
BuildRequires: xorg-x11-server-devel
BuildRequires: xorg-x11-proto-xproto
BuildRequires: xorg-x11-utils
BuildRequires: pkgconfig(xt) pkgconfig(xtst)
BuildRequires: libjpeg-devel libxslt-devel openssl-devel pkgconfig(gl) pkgconfig(glu) pkgconfig(xau) pkgconfig(xaw7)
%endif
BuildRequires: libreoffice-artwork-devel = %version
BuildRequires: libreoffice-libs-core-devel = %version
############################
# KDE3 stuff
%if 0%{?suse_version}
BuildRequires: kdelibs3-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
############################
# 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
License: LGPLv3
Group: Productivity/Office/Suite
AutoReqProv: on
Requires: libreoffice-libs-core = %version
# compat stuff
Provides: OpenOffice_org-filters = %version
Obsoletes: OpenOffice_org-filters <= %version
Summary: Import and Export Filters for LibreOffice
Url: http://www.documentfoundation.org/
Source0: libreoffice-%piece-%ooo_piece_version.tar.bz2
# FIXME: hack the provides and requires (bnc#411538)
# make sure external scripts are used
%define _use_internal_dependency_generator 0
%define __find_provides /bin/sh %_sourcedir/lo-filters-prov %name
%define __find_requires /bin/sh %_sourcedir/lo-filters-req %name
Source100: lo-filters-prov
Source101: lo-filters-req
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc
%description
This package includes some separated LibreOffice import and export
filters, for example:
- OOXML
- PDF
- T602
- MS Works
%package optional
License: LGPLv3
Summary: Additional Import and Export Filters for LibreOffice
Group: Productivity/Office/Suite
Requires: libreoffice-calc = %version
Requires: libreoffice-draw = %version
Requires: libreoffice-math = %version
Requires: libreoffice-writer = %version
Requires: libreoffice-impress = %version
%if 0%{?suse_version}
Supplements: libreoffice
%endif
# compat stuff
Provides: OpenOffice_org-filters-optional = %version
Obsoletes: OpenOffice_org-filters-optional <= %version
Provides: libreoffice:%ooo_prefix/%ooo_home/share/xslt/docbook/DocBookTemplate.stw
%description optional
This package includes some additional import and export filters for
LibreOffice:
- AportisDoc (Palm)
- Pocket Excel
- Pocket Word
- DocBook
- XHTML
%package l10n-prebuilt
License: LGPLv3
Summary: Prebuilt LibreOffice Filters Localizations
Group: Productivity/Office/Suite
AutoReqProv: off
# compat stuff
Provides: OpenOffice_org-filters-l10n-prebuilt = %version
Obsoletes: OpenOffice_org-filters-l10n-prebuilt <= %version
%description l10n-prebuilt
This package includes the prebuilt localization of LibreOffice
import and export filters. 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.
%package devel
Requires: %name = %version
Requires: %name-optional = %version
Requires: libreoffice-ure-devel = %version
Requires: libreoffice-libs-extern-devel = %version
# compat stuff
Provides: OpenOffice_org-filters-devel = %version
Obsoletes: OpenOffice_org-filters-devel <= %version
License: LGPLv3
Summary: LibreOffice Filters Development
Group: Productivity/Office/Suite
AutoReqProv: off
%description devel
This package allows development based on the LibreOffice import and
export filters API.
%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
$OO_TOOLSDIR/piece/install-generic %piece %ooo_sourcedirname
# hack to install extensions
mkdir -p $RPM_BUILD_ROOT%ooo_prefix/%ooo_home/share/extension/install
find . -name "*.oxt" -exec cp {} $RPM_BUILD_ROOT%ooo_prefix/%ooo_home/share/extension/install \;
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel
/sbin/ldconfig
%postun devel
/sbin/ldconfig
# optional
%pre optional
if test $1 -gt 1 ; then
echo "Unregistering the older LibreOffice optional filter extensions..."
# Writer2latex extensions has been completely removed in 3.0.99.6 (bnc#529914)
if unopkg list --shared | grep -q "org.openoffice.da.writer2latex.oxt" ; then
unopkg remove --shared org.openoffice.da.writer2latex.oxt || true;
# clear disk cache
unopkg list --shared > /dev/null 2>&1 || true
fi
fi
%files -f files-%piece.txt
%defattr(-,root,root)
%files -f files-%piece-optional.txt optional
%defattr(-,root,root)
%files devel
%defattr(-,root,root)
%dir %ooo_prefix/%ooo_home/solver
%ooo_prefix/%ooo_home/solver/*
%exclude %ooo_prefix/%ooo_home/solver/noarch
%files l10n-prebuilt
%defattr(-,root,root)
%ooo_prefix/%ooo_home/solver/noarch
%changelog