File apostrophe.spec of Package apostrophe

#
# spec file for package apostrophe
#
# Copyright (c) 2024 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:           apostrophe
Version:        3.2+git20240925.a827a4c
Release:        0
Summary:        A distraction free Markdown editor
License:        GPL-3.0
URL:            https://gitlab.gnome.org/World/%{name}
### Apparently this isn't provided directly anymore and I'm
###   not sure if/how it was used as it seems to just be 
###   sitting at %%{_prefix}/share/apostrophe/media/reveal.js.zip
###   and it was always on the user to unzip it to:
###   %%{_prefix}/share/apostrophe/libs/reveal.js
### Lives here: https://github.com/hakimel/reveal.js
Patch0:         remove-reveal.js-check.diff
#####
Source:         %{name}-%{version}.tar.gz
BuildRequires:  appstream-glib
BuildRequires:  cmake
BuildRequires:  gettext-runtime
BuildRequires:  gettext-tools
BuildRequires:  git
BuildRequires:  libgirepository-1_0-1
BuildRequires:  libglib-2_0-0
BuildRequires:  libgspell-1-3
BuildRequires:  libgtk-4-1
#BuildRequires:  libwebkit2gtk-4_0-37
#BuildRequires:  libwebkit2gtk-4_1-0
#BuildRequires:  libwebkit2gtk-5_0-0
BuildRequires:  libwebkitgtk-6_0-4
BuildRequires:  libxml2-tools
BuildRequires:  meson
BuildRequires:  ninja
BuildRequires:  pandoc-cli
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gspell-1)
BuildRequires:  pkgconfig(gtk4)
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(libhandy-1)
BuildRequires:  python3
BuildRequires:  python3-Levenshtein
BuildRequires:  python3-cairo
BuildRequires:  python3-enchant
BuildRequires:  python3-gobject
BuildRequires:  python3-pypandoc
BuildRequires:  python3-regex
BuildRequires:  python3-setuptools
BuildRequires:  sassc
# ----
Requires:       python3-chardet
Requires:       python3-pypandoc
Requires:       pandoc-cli
# ----
BuildArch:      noarch

%description
Apostrophe is a GTK+ based distraction free Markdown editor, originally developed by Wolf Vollprecht and currently developed and maintained by Manuel Genovés.
It uses pandoc as back-end for parsing Markdown and offers a very clean and sleek user interface.

%prep
%autosetup
find . -type f -exec sed -i 's@#!%{_bindir}/env python3$@#!%{_bindir}/python3@' {} +
find . -name 'text_view_scroller.py' -exec chmod ugo-x {} \;

%build
%meson
%meson_build

%install
find . -name '.pylintrc' -exec rm -v {} \;
%meson_install
%find_lang %{name}

%files -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/*
%dir %{_datadir}/%{name}/*/*
%dir %{_datadir}/%{name}/*/*/*
%{_bindir}/%{name}
%dir %{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}/*
%{_datadir}/%{name}/%{name}.gresource
%{_datadir}/%{name}/lua/*
%{_datadir}/%{name}/media/*
%{_datadir}/%{name}/reference_files/*
%{_datadir}/%{name}/styles/*.xml
%{_datadir}/%{name}/ui/*
%{_datadir}/applications/org.gnome.gitlab.somas.Apostrophe.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gitlab.somas.Apostrophe.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.gitlab.somas.Apostrophe.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.gitlab.somas.Apostrophe-symbolic.svg
%{_datadir}/metainfo/org.gnome.gitlab.somas.Apostrophe.metainfo.xml

%license LICENSE
%doc README.md

%changelog

openSUSE Build Service is sponsored by