File smestorage.spec of Package smestorage

#
# spec file for package smestorage
#
# 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:           smestorage
Version:        3.0.6
Release:        0
License:        GPL-2.0+
Summary:        SMEStorage Linux Cloud Tools
Url:            http://www.smestorage.com
Group:          Productivity/Networking/Other
Source0:        %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM smestorage-3.0.6-gcc47.patch lazy.kent@opensuse.org -- fix compilation with GCC 4.7
Patch0:         smestorage-3.0.6-gcc47.patch
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtNetwork)
BuildRequires:  pkgconfig(QtXml)
Requires:       perl(Fuse)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package provides a Virtual Cloud Storage Drive using the FUSE open
source technology and the SMEStorage multi-cloud gateway.
It provides support for Amazon S3, RackSpace Cloud Files, Apple
MobileMe, Box.net, Microsoft Live Mesh, Microsoft SkyDrive, GMail,
Google Docs, Email Clouds, FTP clouds and any WebDav supported cloud.

%prep
%setup -q
%patch0
sed 's|/usr/share/pixmaps/sme-desktop_128.png|SMEStorageClient|' \
        smestorage-client-kde.desktop > SMEStorageClient.desktop
sed 's|/usr/share/pixmaps/SyncCenter_icon_42.png|SMESyncCenter|' \
        smesynccenter-kde.desktop > SMESyncCenter.desktop
sed 's|/usr/share/pixmaps/smestorage_explorer_icon_42.png|SMEExplorer|' \
        smeexplorer-kde.desktop > SMEExplorer.desktop

%build
cd SMEStorageClient
qmake \
    QMAKE_CFLAGS+="%{optflags}" \
    QMAKE_CXXFLAGS+="%{optflags}" \
    QMAKE_STRIP=""
make %{?_smp_mflags}
cd ../SMESyncCenter
qmake \
    QMAKE_CFLAGS+="%{optflags}" \
    QMAKE_CXXFLAGS+="%{optflags}" \
    QMAKE_STRIP=""
make %{?_smp_mflags}
cd ../SMEExplorer
qmake \
    QMAKE_CFLAGS+="%{optflags}" \
    QMAKE_CXXFLAGS+="%{optflags}" \
    QMAKE_STRIP=""
make %{?_smp_mflags}

%install
install -Dm 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dm 0755 SMEStorageClient/SMEStorageClient \
    %{buildroot}%{_bindir}/SMEStorageClient
install -Dm 0755 SMESyncCenter/SMESyncCenter \
    %{buildroot}%{_bindir}/SMESyncCenter
install -Dm 0755 SMEExplorer/smestorageexplorer \
    %{buildroot}%{_bindir}/smestorageexplorer
install -dm 0755 %{buildroot}%{_datadir}
cp -r smestorageclient %{buildroot}%{_datadir}
install -Dm 0644 pixmaps/sme-desktop_128.png \
    %{buildroot}%{_datadir}/pixmaps/SMEStorageClient.png
install -Dm 0644 pixmaps/SyncCenter_icon_42.png \
    %{buildroot}%{_datadir}/pixmaps/SMESyncCenter.png
install -Dm 0644 pixmaps/smestorage_explorer_icon_42.png \
    %{buildroot}%{_datadir}/pixmaps/SMEExplorer.png
%fdupes -s %{buildroot}%{_datadir}
%suse_update_desktop_file -i SMEStorageClient
%suse_update_desktop_file -i SMESyncCenter
%suse_update_desktop_file -i SMEExplorer

%files
%defattr(-,root,root,-)
%{_bindir}/SMES*
%{_bindir}/smes*
%{_datadir}/applications/*.desktop
%{_datadir}/smestorageclient
%{_datadir}/pixmaps/*.png

%changelog