File libreoffice-testing.spec of Package libreoffice-testing

#
# spec file for package libreoffice-testing
#
# 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-testing
Version:        3.3.1.2
Release:        1.<RELEASE2>
%define         piece             testing
%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
#!BuildIgnore:  libreoffice
BuildRequires:  libreoffice-ure-devel = %version
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 mono-devel neon-devel pam-devel perl-Archive-Zip perl-Compress-Zlib python-devel recode unixODBC-devel unzip xml-commons-apis zip
############################
# cppunit stuff
%if 0%{?suse_version} >= 01100
BuildRequires:  libcppunit-devel
%endif
############################
# junit stuff
%if %suse_version > 1110
BuildRequires:  junit4
%endif
License:        LGPLv3
Group:          Productivity/Office/Suite
AutoReqProv:    on
Requires:       libreoffice-ure = %version
# compat stuff
Provides:       OpenOffice_org-testing = %version
Obsoletes:      OpenOffice_org-testing <= %version
Summary:        LibreOffice Testing Tools
Url:            http://www.documentfoundation.org/
Source0:        libreoffice-%piece-%ooo_piece_version.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

%description
This package provides tools for LibreOffice testing.


%prep
%setup -q -n libreoffice-%piece-%ooo_piece_version
# FIXME: testtools need to register components and it somehow fails
#        smoketestoo_native should be started when the whole application is installed
mkdir -p ooo-build/do-not-build
mv testtools ooo-build/do-not-build
mv smoketestoo_native ooo-build/do-not-build

%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

%clean
rm -rf $RPM_BUILD_ROOT

%files -f files-%piece.txt
%defattr(-,root,root)
%dir %ooo_prefix/%ooo_home/solver
%ooo_prefix/%ooo_home/solver/*
%exclude %ooo_prefix/%ooo_home/solver/noarch

%changelog
openSUSE Build Service is sponsored by