File nwg-panel.spec of Package nwg-panel

Name:       nwg-panel
Version:    0.10.12
Release:    1
Summary:    GTK3-based panel for sway and Hyprland Wayland compositors
License:    MIT
URL:        https://github.com/nwg-piotr/%{name}
Source0:    https://github.com/nwg-piotr/nwg-panel/archive/v%{version}.tar.gz

BuildArch:  noarch

BuildRequires: desktop-file-utils
BuildRequires: python313-devel
BuildRequires: python313-setuptools
BuildRequires: systemd-rpm-macros
 
Requires:   libgtk-layer-shell0
Requires:   typelib-1_0-GtkLayerShell-0_1
Requires:   gtk3
Requires:   python313-gobject
Requires:   python313-i3ipc
Requires:   python313-dasbus
Requires:   wlr-randr
Requires:   pulseaudio-utils
Requires:   playerctl
Requires:   typelib-1_0-Playerctl-2_0
Requires:   typelib-1_0-Dbusmenu-0_4
Requires:   typelib-1_0-DbusmenuGtk3-0_4

Recommends: brightnessctl
Recommends: python313-netifaces
Recommends: python313-psutil
Recommends: python313-pybluez
 
%description
This application is a part of the nwg-shell project.

Nwg-panel is a GTK3-based panel for sway and Hyprland Wayland compositors. The panel is equipped with a graphical configuration program that frees the user from the need to manually edit configuration files.
 
%prep
%autosetup
 
%build
%py3_build
 
%install
%py3_install
 
install -Dpm 0644 %{name}.svg -t %{buildroot}%{_datadir}/pixmaps/
install -Dpm 0644 nwg-shell.svg -t %{buildroot}%{_datadir}/pixmaps/
install -Dpm 0644 nwg-processes.svg -t %{buildroot}%{_datadir}/pixmaps/
install -Dpm 0755 %{name}-config.desktop -t %{buildroot}%{_datadir}/applications/
install -Dpm 0644 %{name}.service -t %{buildroot}%{_userunitdir}/
 
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
 
%post
%systemd_user_post %{name}.service
 
%preun
%systemd_user_preun %{name}.service
 
%postun
%systemd_user_postun_with_restart %{name}.service

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}-config
%{_bindir}/nwg-dwl-interface
%{_bindir}/nwg-processes
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.svg
%{_userunitdir}/%{name}.service
%{python3_sitelib}/nwg_panel-%{version}-py%{python3_version}.egg-info/
%{python3_sitelib}/nwg_panel/ 

%changelog
* Sa Nov 1 2025 Simon Heise - 0.10.12
- Initial packaging of nwg-panel for openSUSE Tumbleweed. Build by comparing fedora spec file and arch linux PKGBUILD
openSUSE Build Service is sponsored by