File Gradia.spec of Package Gradia

#
# spec file for package Gradia
#
# Copyright (c) 2025 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/
#


Name:           Gradia
Version:        1.11.1
Release:        0
Summary:        Make your screenshots ready for the world
License:        GPL-3.0-only
URL:            https://github.com/AlexanderVanhee/Gradia
Source:         %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  gtk4-tools
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  desktop-file-utils
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(blueprint-compiler)
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(pygobject-3.0)
BuildRequires:  pkgconfig(gtksourceview-5)
Requires:       python3-PIL
Requires:       python3-Pillow >= 11.2.1
Requires:       libportal-gtk4-1
Requires:       libgradient_gen
Requires:       python3-pytesseract
BuildArch:      noarch

%description
Make your screenshots ready for the world.
On social media, it's often hard to control how your images appear to others.
Transparent or oddly sized images—like screenshots—often don't display well.
Fixing these issues can feel like more trouble than it's worth.
Gradia aims to alleviate that problem by allowing you to quickly edit images to address these issues,
while also offering options to enhance their overall appearance.

%package -n libgradient_gen
Summary:        Library for %{name}

%description -n libgradient_gen
%{summary}.

%lang_package

%prep
%autosetup -p1

%build
%meson
%meson_build

%install
%meson_install

%find_lang gradia

%post -n libgradient_gen -p /sbin/ldconfig
%postun -n libgradient_gen -p /sbin/ldconfig

%files
%license COPYING
%doc README.md
%{_bindir}/gradia
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/gradia/
%exclude %{_datadir}/gradia/gradia/libgradient_gen.so
%exclude %{_datadir}/gradia/gradia/graphics/gradient_gen.c
%{_datadir}/icons/hicolor/*/*/*.svg
%{_datadir}/metainfo/*.metainfo.xml
%{_datadir}/fonts/Caveat-VariableFont_wght.ttf
%{_datadir}/fonts/LICENSE-OFL.txt

%files -n libgradient_gen
%{_datadir}/gradia/gradia/libgradient_gen.so
%{_datadir}/gradia/gradia/graphics/gradient_gen.c

%files lang -f gradia.lang

%changelog
openSUSE Build Service is sponsored by