File qman.spec of Package qman

#
# spec file for package qman
#
# Copyright (c) 2025 Thiago Masato Costa Sueto
#
# 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:           qman
Version:        1.4.1
Release:        0
Summary:        A more modern manual page viewer for our terminals
License:        BSD-2-Clause
URL:            https://github.com/plp13/qman
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# Fixed upstream in https://github.com/plp13/qman/commit/68c705134fd8524770258e2b28386afe5c01036c
Patch0:         sigusr1_handler.patch
BuildRequires:  gcc
BuildRequires:  meson
BuildRequires:  python3-cogapp
BuildRequires:  pkgconfig(liblzma)
BuildRequires:  pkgconfig(ncursesw)
BuildRequires:  pkgconfig(inih)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(cunit)
Requires:       man
Requires:       groff-base

%description
Qman is a modern, interactive manual page viewer for our terminals. It strives
to be easy to use for anyone familiar with the man(1) command, and also to be
fast and tiny, so that it can be used everywhere.

%prep
%autosetup -p1

%build
%meson -Ddocdir=%{_docdir}/%{name}
%meson_build

%install
%meson_install
rm -v %{buildroot}/%{_docdir}/%{name}/{PACKAGING,TESTING}.md

%check
%meson_test

%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%dir %{_sysconfdir}/xdg/qman/
%dir %{_sysconfdir}/xdg/qman/themes/
%config(noreplace) %{_sysconfdir}/xdg/qman/qman.conf
%config(noreplace) %{_sysconfdir}/xdg/qman/themes/catppuccin_latte.conf
%config(noreplace) %{_sysconfdir}/xdg/qman/themes/modernity.conf

%changelog
openSUSE Build Service is sponsored by