sway-config-fedora/fedora-sway-configs.spec.rpkg

120 lines
2.9 KiB
Text

# vim: ft=spec
%bcond_without sddm
%bcond_with check
%global sway_ver 1.7
%global sddm_ver 0.19.0^
Name: {{{ git_name }}}
Version: {{{ git_version }}}
Release: {{{ git_release }}}%{?dist}
Summary: Configuration files for Fedora Sway Spin
License: MIT
URL: https://gitlab.com/fedora/sigs/sway/fedora-sway-configs
Source0: {{{ git_pack path=$(git rev-parse --show-toplevel) }}}
BuildArch: noarch
BuildRequires: make
%if %{with check}
BuildRequires: sway
%endif
%description
%{summary}.
%package -n sway-config-fedora
Summary: Configuration of Sway for Fedora Sway Spin
BuildArch: noarch
Requires: sway >= %{sway_ver}
Provides: sway-config = %{version}-%{release}
Conflicts: sway-config
# Lack of graphical drivers may hurt the common use case
Requires: mesa-dri-drivers
# Logind needs polkit to create a graphical session
Requires: polkit
# dmenu (as well as rxvt any many others) requires XWayland on Sway
Requires: xorg-x11-server-Xwayland
# grim is the recommended way to take screenshots on sway 1.0+
Recommends: grim
# Install configs and scripts for better integration with systemd user session
Recommends: sway-systemd
# Minimal installation doesn't include Qt Wayland backend
Recommends: (qt5-qtwayland if qt5-qtbase-gui)
Recommends: (qt6-qtwayland if qt6-qtbase-gui)
### Collected from /etc/sway/config and 50-fedora.conf
Recommends: dmenu
Recommends: findutils
Recommends: foot
Recommends: libnotify
Requires: /usr/bin/pgrep
Requires: /usr/bin/pkill
Requires: desktop-backgrounds-compat
Requires: light
Requires: lxqt-policykit
Requires: playerctl
Requires: pulseaudio-utils
Requires: swaybg
Requires: swayidle
Requires: swaylock
Requires: waybar
%description -n sway-config-fedora
%{summary}.
%if %{with sddm}
%package -n sddm-wayland-sway
Summary: Sway Wayland SDDM greeter configuration
Provides: sddm-greeter-displayserver
Conflicts: sddm-greeter-displayserver
Requires: lxqt-themes-fedora
Requires: sddm >= %{sddm_ver}
Requires: sway
%description -n sddm-wayland-sway
This package contains configuration and dependencies for SDDM
to use Sway for the greeter display server.
%endif
%prep
{{{ git_setup_macro path=$(git rev-parse --show-toplevel) }}}
%build
%make_build
%install
%make_install PREFIX='%{_prefix}' WITH_SDDM='%[%{with sddm}?"yes":"no"]'
%if %{with check}
%check
%make_build -- check
%endif
%files -n sway-config-fedora
%license LICENSE
%config(noreplace) %{_sysconfdir}/sway/config
# should it be in the swaylock package?
%dir %{_sysconfdir}/swaylock
%config(noreplace) %{_sysconfdir}/swaylock/config
%{_datadir}/sway/config.d
%{_datadir}/wayland-sessions/sway.desktop
%{_libexecdir}/sway
%if %{with sddm}
%files -n sddm-wayland-sway
%config(noreplace) %{_sysconfdir}/sway/sddm-greeter.config
%{_prefix}/lib/sddm/sddm.conf.d/wayland-sway.conf
%endif
%changelog
{{{ git_changelog }}}