File QTjsonDiff.spec of Package QTjsonDiff

#
# spec file for package QTjsonDiff
#
# Copyright (c) specCURRENT_YEAR 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 http://bugs.opensuse.org/
#


Name:           QTjsonDiff
Version:        1
Release:        0
Summary:        JSON diff UI
License:        MIT
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          Development/Tools/Other
Url:            https://github.com/coozoo/qtjsondiff
Source:         QTjsonDiff-%{version}.tar.xz
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-linguist
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
Requires(post): update-desktop-files
Requires(postun): update-desktop-files

%description
Some kind of json diff widget that consists of two json viewer
widgets with highlighting of jsons. There is two modes to view:
json and text, search text inside json. Use different sources
of json file, url or simply copy-paste. And some more features.

%prep
%setup -q

%build
%qmake5
%make_build

%install
%qmake5_install
# upstream install is into /usr/share/icons which is a little bit
# wrong. It's not an icon theme.
mkdir %{buildroot}/%{_datadir}/pixmaps
mv %{buildroot}/%{_datadir}/icons/diff.png %{buildroot}/%{_datadir}/pixmaps/diff.png
%suse_update_desktop_file -G "JSON Diff Tool" -r qtjsondiff Utility TextEditor

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_datadir}/pixmaps/diff.png
%{_datadir}/applications/qtjsondiff.desktop

%changelog

openSUSE Build Service is sponsored by