File nwg-hello.spec of Package nwg-hello

%define skip_python312 1
%define skip_python311 1
%define skip_python310 1
Name:           nwg-hello
Version:        0.4.1
Release:        1%{?dist}
Summary:        nwg-shell clipboard manager, a GTK3-based GUI for cliphist
License:        MIT
URL:            https://github.com/nwg-piotr/nwg-hello
Source0:        v%{version}.tar.gz
Source1:        nwg-hello.tmpfiles

BuildArch:      noarch

BuildRequires:  gtk-layer-shell-devel
BuildRequires:  pkgconfig
BuildRequires:  python3-build
BuildRequires:  python3-installer
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
BuildRequires:  python3-pip

Requires:       python3
Requires:       python-gobject
Requires:       libgtk-3-0
Requires:       libgtk-layer-shell0
Requires:       python3-gobject
Requires:       typelib(GtkLayerShell)
Requires:       greetd
Recommends:     mugshot
Recommends:     gnome-themes-extras

%description
nwg-shell display manager, based on 'greetd'

%prep
%autosetup -n %{name}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
install -Dm 644 %{name}-default.json %{buildroot}%{_sysconfdir}/%{name}/%{name}-default.json
install -Dm 644 %{name}-default.css %{buildroot}%{_sysconfdir}/%{name}/%{name}-default.css
install -Dm 644 hyprland.conf %{buildroot}%{_sysconfdir}/%{name}/hyprland.conf
install -Dm 644 sway-config %{buildroot}%{_sysconfdir}/%{name}/sway-config
install -Dm 644 README %{buildroot}%{_sysconfdir}/%{name}/README
install -Dm 644 img/* -t %{buildroot}%{_datadir}/%{name}/
install -Dm 644 nwg.jpg %{buildroot}%{_datadir}/%{name}/nwg.jpg
install -Dm 644 cache.json 	%{buildroot}%{_localstatedir}/cache/%{name}/cache.json
install -Dm 644 %{SOURCE1} %{buildroot}%{_libdir}/tmpfiles.d/%{name}.conf

%files
%{_bindir}/nwg-hello
%license LICENSE
%doc README.md
%{_sysconfdir}/%{name}/*
%{_datadir}/%{name}/*
%{python3_sitelib}/nwg_hello/*
%{python3_sitelib}/nwg_hello-%{version}.dist-info/*
%{_sysconfdir}/%{name}/README
%{_libdir}/tmpfiles.d/%{name}.conf
%{_localstatedir}/cache/%{name}/cache.json
%dir %{_localstatedir}/cache/%{name}
%dir %{python3_sitelib}/nwg_hello
%dir %{python3_sitelib}/nwg_hello-%{version}.dist-info
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by