File robomongo.spec of Package robomongo

# spec file for package robomongo
# Copyright (c) 2017 SUSE LINUX 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

Name:           robomongo
Version:        1.0
Release:        0
Summary:        Native and cross-platform MongoDB manager
License:        GPL-3.0
Group:          Development/Database
Source0:        %{name}.tar.xz
Source1:	%{name}.desktop
Source2:	%{name}.png
BuildRequires:  cmake >= 3.0
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5Network)
BuildRequires:  cmake(Qt5PrintSupport)
BuildRequires:  mongodb-devel
BuildRequires:  openssl-devel
BuildRequires:  mongodb
BuildRequires:  ImageMagick
#BuildRequires:	ghostscript-core
BuildRequires:	xz
Requires:       mongodb-shell
Recommends:     mongodb

Robomongo is a shell-centric cross-platform open source MongoDB management
tool (i.e. Admin GUI). Robomongo embeds the same JavaScript engine that
powers MongoDB's mongo shell.

%setup -q -n %{name}

make %{?_smp_mflags} V=1

install -D -m 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop
# Install icon
for res in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96 128x128 256x256; do \
  %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${res}/apps
  convert -size 128x128 %{S:2} -resize ${res} %{buildroot}/%{_datadir}/icons/hicolor/${res}/apps/%{name}.png
%suse_update_desktop_file -c %{name} "Robomongo" "MongoDB Admin UI" %{name} %{name}.png Development Utility Database