sway-config-fedora/sway-config-fedora.spec.rpkg
2022-12-12 19:38:04 -08:00

115 lines
2.8 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: Fedora Sway Spin configuration for Sway
License: MIT
URL: https://gitlab.com/fedora/sigs/sway/{{{ git_name }}}
Source0: {{{ git_pack path=$(git rev-parse --show-toplevel) }}}
BuildArch: noarch
BuildRequires: make
%if %{with check}
BuildRequires: sway
%endif
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
# 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: foot
Recommends: libnotify
Recommends: rofi-wayland
Requires: /usr/bin/pgrep
Requires: /usr/bin/pkill
Requires: desktop-backgrounds-compat
Requires: grimshot
Requires: light
Requires: lxqt-policykit
Requires: playerctl
Requires: pulseaudio-utils
Requires: swaybg
Requires: swayidle
Requires: swaylock
Requires: waybar
%description
%{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
%license LICENSE
%config(noreplace) %{_sysconfdir}/sway/config
# should it be in the swaylock package?
%dir %{_sysconfdir}/swaylock
%config(noreplace) %{_sysconfdir}/swaylock/config
%{_bindir}/start-sway
%{_datadir}/sway/config.d
%{_datadir}/sway/config.live.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
%{_libexecdir}/sddm-compositor-sway
%endif
%changelog
{{{ git_changelog }}}