File slaby-scripts.spec of Package slaby-scripts

#
# spec file for package slaby-scripts
#
# 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:           slaby-scripts
Version:        1
Release:        0
License:        GPL-2.0-only
Group:          Productivity/Other
Summary:        Various scripts which are a must for me
URL:            https://github.com/jirislaby/slaby-scripts
Source:         %{name}-%{version}.tar.xz
BuildRequires:  meson
BuildRequires:  systemd-rpm-macros
BuildRequires:  xz
Requires:       python3-termcolor
BuildArch:      noarch

%description
Various scripts which are a must for me. They are mostly for working with suse
trees.

%package -n %{name}-graphics
Summary:        Scripts depending on graphics
Group:          Productivity/Other
%if 0%{?is_opensuse}
Requires:       xdotool
%endif

%description -n %{name}-graphics
Scripts that depend on graphics (X/wayland).

%package -n %{name}-nvr
Summary:        Scripts for NVR
Group:          Productivity/Other
Requires:       perl(Config::IniFiles)

%description -n %{name}-nvr
Scripts for recording videos known as NVR.

%prep
%autosetup

%build
%meson -Dunitdir=%{_unitdir}

%install
%meson_install

%postun -n %{name}-nvr
%service_del_postun_without_restart nvr@.service

%files -n %{name}
%{_bindir}/*
%exclude %{_bindir}/nvr.pl
%exclude %{_bindir}/openterm
%exclude %{_bindir}/or_parse.sh
%{_datadir}/%{name}

%files -n %{name}-graphics
%{_bindir}/openterm

%files -n %{name}-nvr
%{_bindir}/nvr.pl
%dir %{_unitdir}/
%{_unitdir}/nvr@.service
%ghost %attr(0644,root,root) %config %{_sysconfdir}/nvr.ini

%changelog
openSUSE Build Service is sponsored by