File drawing.spec of Package drawing

#
# spec file for package drawing
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define  _name  com.github.maoschanz.drawing
Name:           drawing
Version:        @SERVICE@
Release:        0
Summary:        A drawing application for the GNOME desktop
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/Bitmap Editors
URL:            https://github.com/maoschanz/drawing
Source:         %{name}-%{version}.tar.xz
# Needed for typelib() - Requires.
BuildRequires:  gobject-introspection
BuildRequires:  hicolor-icon-theme
BuildRequires:  meson >= 0.46.0
BuildRequires:  pkgconfig
BuildRequires:  python3-gobject >= 3.30
BuildRequires:  python3-pycairo
BuildRequires:  update-desktop-files
#uildRequires:  pkgconfig(appstream-builder)
BuildRequires:  pkgconfig(glib-2.0)
Requires:       python3-gobject
Requires:       python3-gobject-Gdk
Requires:       python3-gobject-cairo
Requires:       python3-pycairo
Recommends:     %{name}-lang
Recommends:     gsettings-backend-dconf
BuildArch:      noarch
%glib2_gsettings_schema_requires

%description
A simple drawing application for Linux. This application is a basic image
editor, similar to Microsoft Paint, but aiming at the GNOME desktop.
PNG, JPEG and BMP files are supported. Besides GNOME, some more traditional
design layouts are available too, as well as an elementaryOS layout. It
should also be compatible with Purism's Librem 5 phone.

%lang_package

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/Other
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description doc
This package provides the documentations for %{name}.

%prep
%setup -q
sed -i 's/0\.50\.0/0.46.0/' meson.build

%build
%meson
%meson_build

%install
%meson_install

%suse_update_desktop_file -r -G "Simple drawing utility" %{_name} GTK GNOME Graphics 2DGraphics RasterGraphics

%find_lang %{name} --without-gnome
%find_lang %{name} %{name}-doc.lang --with-gnome --without-mo

%files
%doc CONTRIBUTING.md README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/%{name}
%{_datadir}/glib-2.0/schemas/%{_name}.gschema.xml
%{_datadir}/icons/hicolor/*/apps/%{_name}*.??g
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/%{_name}.appdata.xml
%license LICENSE

%files lang -f %{name}.lang

%files doc -f %{name}-doc.lang
%dir %{_datadir}/help/C
%dir %{_datadir}/help/C/%{name}

%changelog
openSUSE Build Service is sponsored by