File nwg-shell.spec of Package nwg-shell

#
# nwg-shell RPM Spec File Draft
# Based on Arch Linux PKGBUILD
#

%define __brp_strip /bin/true
%define debug_package %{nil}

# Metadata from PKGBUILD
Name:           nwg-shell
Version:        0.5.49
Release:        1%{?dist}
Summary:        Installer & meta-package for the nwg-shell project
License:        MIT
URL:            https://nwg-piotr.github.io/nwg-shell/
Source0:        v%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-wheel
BuildRequires:  python3-build
BuildRequires:  python3-installer

# PKGBUILD dependencies (need verification for RPM names!)
Requires:       gnome-themes-extra
Requires:       grim
Requires:       imagemagick
Requires:       jq
Requires:       libappindicator-gtk3
Requires:       network-manager-applet
Requires:       papirus-icon-theme
Requires:       playerctl
Requires:       polkit-gnome
Requires:       python3
Requires:       slurp
Requires:       swappy
Requires:       sway
Requires:       swayidle
Requires:       dejavu-fonts-ttf
Requires:       swaylock
Requires:       swaybg
Requires:       wl-clipboard
Requires:       xorg-x11-server-Xwayland
# The following are other nwg components, which should ideally be separate RPM packages
# or their python modules should be installed via python-installer's mechanism.
# Since this is a meta-package, we assume they are separate packages on the target system.
Requires:       azote
Requires:       gopsuinfo
Requires:       nwg-dock
Requires:       nwg-drawer
Requires:       nwg-menu
Requires:       nwg-look
Requires:       nwg-panel
Requires:       nwg-hello
Requires:       nwg-shell-config
Requires:       nwg-displays
Requires:       nwg-clipman
Requires:       nwg-readme-browser
Requires:       nwg-icon-picker
Requires:       swaync
Requires:       xdg-user-dirs
Recommends:       nwg-shell-wallpapers
Recommends:       gtklock
Recommends:       gtklock-userinfo-module
Recommends:       gtklock-powerbar-module
Recommends:       gtklock-playerctl-module
Recommends:       wlsunset
Recommends:       foot
Recommends:       hyprland
Recommends:       nwg-dock-hyprland
Recommends:       firefox
Recommends:       thunar



%description
This is the installer and meta-package for the nwg-shell project,
a community-driven Wayland desktop environment based on the Sway compositor.
It pulls in all necessary dependencies for a complete nwg-shell experience.

# Prep section
%prep
%setup -q -n %{name}-%{version}

# Build section (equivalent to PKGBUILD's build() function)
%build
# Build the python wheel
%{__python3} -m build --wheel --no-isolation

# Install section (equivalent to PKGBUILD's package() function)
%install
# Install files from the wheel package
%{__python3} -m installer --destdir=%{buildroot} dist/*.whl

# Install scripts
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 scripts/* %{buildroot}%{_bindir}/
# Install background image
install -d -m 755 %{buildroot}%{_datadir}/backgrounds/
install -m 644 %{name}.jpg %{buildroot}%{_datadir}/backgrounds/%{name}.jpg
# Install desktop file
install -d -m 755 %{buildroot}%{_datadir}/applications/
install -m 644 nwg-readme.desktop %{buildroot}%{_datadir}/applications/nwg-readme.desktop

%files
%license LICENSE
%doc README.md
%{_bindir}/*
%{_datadir}/backgrounds/%{name}.jpg
%{_datadir}/applications/nwg-readme.desktop
/usr/lib/python3.13/site-packages/nwg_shell/*
/usr/lib/python3.13/site-packages/nwg_shell-%{version}.dist-info/*
%dir /usr/lib/python3.13/site-packages/nwg_shell
%dir /usr/lib/python3.13/site-packages/nwg_shell-%{version}.dist-info


%dir %{_datadir}/backgrounds/

%post

%changelog
* Fri Oct 11 2025 AI Assistant <assistant@example.com> - 0.5.49-1
- Initial draft based on Arch Linux PKGBUILD.
openSUSE Build Service is sponsored by