File notes-up.spec of Package notes-up

#
# spec file for package notes-up
#
# 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 http://bugs.opensuse.org/
#


Name:           notes-up
Version:        1.5.2
Release:        0
Summary:        Markdown notes editor & manager
License:        GPL-3.0
Group:          System/GUI/Other
Url:            https://github.com/Philip-Scott/Notes-up
Source:         https://github.com/Philip-Scott/Notes-up/archive/%{version}.tar.gz#/Notes-up-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/Philip-Scott/Notes-up/pull/237
Patch0:         desktop.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
# TODO: unbundle discount-markdown
#BuildRequires:  pkgconfig(libmarkdown)
BuildRequires:  pkgconfig(granite)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gtksourceview-3.0)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(vapigen) >= 0.26
BuildRequires:  pkgconfig(webkit2gtk-4.0)
BuildRequires:  pkgconfig(gtkspell3-3.0)
Recommends:     %{name}-lang
Requires:       contractor
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
Notes Up is a notes manager written for Elementary OS. Notes in
Markdown format can be created.

%lang_package

%prep
%setup -q -n Notes-up-%{version}

%patch0 -p1

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install

mkdir -p %{buildroot}%{_datadir}/appdata
mv %{buildroot}%{_datadir}/{metainfo,appdata}/com.github.philip-scott.%{name}.appdata.xml

%find_lang %{name}

%post
%icon_theme_cache_post
%desktop_database_post
%glib2_gsettings_schema_post

%postun
%icon_theme_cache_postun
%desktop_database_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc LICENSE changelog.md
%{_bindir}/com.github.philip-scott.notes-up
%{_datadir}/%{name}/
%{_datadir}/applications/com.github.philip-scott.notes-up.desktop
%{_datadir}/appdata/com.github.philip-scott.notes-up.appdata.xml
%{_datadir}/glib-2.0/schemas/org.notes.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*%{name}.??g
%dir %{_datadir}/appdata

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by