File messagingframework.spec of Package messagingframework

#
# spec file for package messagingframework
#
# Copyright (c) 2012 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/
#

Name:           messagingframework
%define rname   qmf
Summary:        Qt Messaging Framework (QMF)
Version:        2011w23.2
Release:        0
Group:          System/Libraries
License:        LGPL-2.0
URL:            http://qt.gitorious.org/qt-labs/messagingframework/
Source0:        %{rname}-%{version}.tar.bz2
Patch1:         messagingframework-install-plugins-under-lib.patch
Patch2:         messagingframework-install-tests-under-share.patch
Patch3:         includes.patch
Patch4:         cxx_flags.patch
BuildRequires:  libicu-devel
BuildRequires:  libqt4-devel
BuildRequires:  libQtWebKit-devel
BuildRequires:  chrpath

BuildRoot:  %{_tmppath}/%{name}-%{version}-build

%description
The Qt Messaging Framework, QMF, consists of a C++ library and daemon
server process that can be used to build email clients, and more
generally software that interacts with email and mail servers.


%package devel
Summary:    Development files for %{name} (QMF)
Group:      Development/Languages/C and C++
Requires:   %{name} = %{version}

%description devel
This package contains development libraries and headers necessary to
build software using %{name}, the Qt Messaging Framework (QMF)


%prep
%setup -q -n %{rname}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
export PATH=$PATH:%{_libdir}/qt4/bin
export QMF_INSTALL_ROOT=%{_prefix}
qmake QMF_INSTALL_ROOT=$QMF_INSTALL_ROOT

# Call make instruction with smp support
make %{?jobs:-j%jobs}

%install
%makeinstall INSTALL_ROOT=%{buildroot}

%ifarch x86_64
mkdir %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/lib/* %{buildroot}%{_libdir}
%endif

# messagingframework.pc  
mkdir -p %{buildroot}%{_libdir}/pkgconfig
cat >%{buildroot}%{_libdir}/pkgconfig/QtMessagingFramework.pc<<EOF
libdir=%_libdir
includedir=%{_includedir}/QtMessagingFramework

Name: Qtmessagingframework
Description: Qt Messaging Framework
Version: %{version}
EOF

chrpath --delete %{buildroot}%{_libdir}/qt4/tests/messagingframework/tst_*

%check
make check

%clean
rm -rf %{buildroot}

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/messageserver
%{_bindir}/messagingaccounts
%{_bindir}/qtmail
%{_bindir}/serverobserver
%{_libdir}/libqmfclient.so.1*
%{_libdir}/libqmfmessageserver.so.1*
%{_libdir}/libqmfutil.so.1*
%{_libdir}/qt4/plugins/composers/
%{_libdir}/qt4/plugins/contentmanagers/
%{_libdir}/qt4/plugins/messageservices/
%{_libdir}/qt4/plugins/viewers/

%files devel
%defattr(-,root,root,-)
%{_includedir}/qmfclient/
%{_includedir}/qmfmessageserver/
%{_libdir}/libqmfclient.so
%{_libdir}/libqmfmessageserver.so
%{_libdir}/libqmfclient.prl
%{_libdir}/libqmfmessageserver.prl
%{_libdir}/libqmfutil.so
%{_libdir}/qt4/tests/
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by