Blame nwg-panel.spec

426ec9e
%global forgeurl https://github.com/nwg-piotr/%{name}
7fddd64
%global sys_name nwg_panel
7fddd64
7fddd64
Name:       nwg-panel
Packit a047cb0
Version:    0.9.18
d001cf1
Release:    %autorelease
7fddd64
Summary:    GTK3-based panel for sway window manager
7fddd64
BuildArch:  noarch
7fddd64
426ec9e
%forgemeta
426ec9e
7fddd64
License:    MIT
426ec9e
URL:        %{forgeurl}
426ec9e
Source0:    %{forgesource}
7fddd64
309ac8a
BuildRequires: desktop-file-utils
b99ae4e
BuildRequires: python3-devel >= 3.4
4c02d66
BuildRequires: python3-setuptools
309ac8a
BuildRequires: systemd-rpm-macros
7fddd64
7fddd64
Requires:   gtk-layer-shell
7fddd64
Requires:   gtk3
7fddd64
Requires:   python3-gobject
7fddd64
Requires:   python3-i3ipc
ba33ac4
Requires:   python3-dasbus
7fddd64
Requires:   wlr-randr
7fddd64
61d0c14
Recommends: /usr/bin/pactl
7fddd64
Recommends: light
7fddd64
Recommends: playerctl
7fddd64
Recommends: python3-netifaces
7fddd64
Recommends: python3-psutil
7fddd64
Recommends: python3-pybluez
7fddd64
7fddd64
%description
7fddd64
I have been using sway since 2019 and find it the most comfortable working
7fddd64
environment, but... Have you ever missed all the graphical bells and whistles
7fddd64
in your panel, we used to have in tint2? It happens to me. That's why I
7fddd64
decided to try to code a GTK-based panel, including best features from my two
7fddd64
favourites: Waybar and tint2. Many thanks to Developers and Contributors of
7fddd64
the both projects!
7fddd64
7fddd64
There are 8 modules available at the moment, and I don't plan on many more.
7fddd64
Basis system controls are available in the Controls module, and whatever else
7fddd64
you may need, there's an executor for that.
7fddd64
7fddd64
7fddd64
%prep
426ec9e
%forgeautosetup -p1
7fddd64
7fddd64
sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' \
7fddd64
    nwg_panel/executors/arch_updates.py
7fddd64
7fddd64
7fddd64
%build
7fddd64
%py3_build
7fddd64
7fddd64
7fddd64
%install
7fddd64
%py3_install
7fddd64
7fddd64
# Remove shebang from Python libraries
7fddd64
for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/{/,modules}/*.py; do
7fddd64
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
7fddd64
 touch -r $lib $lib.new &&
7fddd64
 mv $lib.new $lib
7fddd64
done
7fddd64
7fddd64
# Remove shebang from Python libraries
7fddd64
for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/*.py; do
7fddd64
 sed '1{\@^#!/usr/bin/python@d}' $lib > $lib.new &&
7fddd64
 touch -r $lib $lib.new &&
7fddd64
 mv $lib.new $lib
7fddd64
done
7fddd64
309ac8a
install -Dpm 0644 %{name}.svg -t %{buildroot}%{_datadir}/pixmaps/
309ac8a
install -Dpm 0644 nwg-shell.svg -t %{buildroot}%{_datadir}/pixmaps/
309ac8a
install -Dpm 0755 %{name}-config.desktop -t %{buildroot}%{_datadir}/applications/
309ac8a
install -Dpm 0644 %{name}.service -t %{buildroot}%{_userunitdir}/
309ac8a
309ac8a
309ac8a
%check
309ac8a
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
309ac8a
309ac8a
309ac8a
%post
309ac8a
%systemd_user_post %{name}.service
309ac8a
309ac8a
%preun
309ac8a
%systemd_user_preun %{name}.service
309ac8a
309ac8a
%postun
309ac8a
%systemd_user_postun_with_restart %{name}.service
309ac8a
7fddd64
7fddd64
%files
7fddd64
%license LICENSE
7fddd64
%doc README.md
7fddd64
%{_bindir}/%{name}
7fddd64
%{_bindir}/%{name}-config
2849b74
%{_bindir}/nwg-dwl-interface
5bf37e2
%{_bindir}/nwg-processes
309ac8a
%{_datadir}/applications/*.desktop
309ac8a
%{_datadir}/pixmaps/*.svg
309ac8a
%{_userunitdir}/%{name}.service
7fddd64
%{python3_sitelib}/%{sys_name}-%{version}-py%{python3_version}.egg-info/
7fddd64
%{python3_sitelib}/%{sys_name}/
7fddd64
7fddd64
7fddd64
%changelog
d001cf1
%autochangelog