%global git_date 20240728 %global git_hash 434d365 %global git_ver 0.9.37 %global rel 2 %global src_name %{name}-%{git_date}-%{git_hash}.tar.xz %global sys_name nwg_panel Name: nwg-panel Version: %{git_ver}^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: GTK3-based panel for sway and Hyprland Wayland compositors BuildArch: noarch License: MIT URL: https://github.com/nwg-piotr/nwg-panel Source: %{url}/%{src_name} BuildRequires: desktop-file-utils BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: systemd-rpm-macros Requires: gtk-layer-shell Requires: gtk3 Requires: python3-gobject Requires: python3-i3ipc Requires: python3-dasbus Requires: wlr-randr Recommends: /usr/bin/pactl Recommends: brightnessctl Recommends: playerctl Recommends: python3-netifaces Recommends: python3-psutil Recommends: python3-pybluez Supplements: hyprland %description This application is a part of the nwg-shell project. A GTK-based panel, including features from Waybar and tint2. There are 12 modules available at the moment, and I don't plan on many more. Basis system controls are available in the Controls module, and whatever else you may need, there's an executor for that. %prep %autosetup -p1 -n %{name} #sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' \ # nwg_panel/executors/arch_updates.py %build %py3_build %install %py3_install # Remove shebang from Python libraries for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/{/,modules}/*.py; do sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done # Remove shebang from Python libraries for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/*.py; do sed '1{\@^#!/usr/bin/python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done install -Dpm 0644 %{name}.svg -t %{buildroot}%{_datadir}/pixmaps/ install -Dpm 0644 nwg-shell.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}/%{sys_name}-%{git_ver}-py%{python3_version}.egg-info/ %{python3_sitelib}/%{sys_name}/ %changelog %autochangelog