%global forgeurl https://github.com/swaywm/sway %global commit 78fa4e985618209a289f892dc54d67c83494a9d2 %global date 20241106 %global forgeurl1 https://gitlab.freedesktop.org/wlroots/wlroots %global archiveext1 tar.gz %global commit1 c5d8f6d1878ad92db0729d3fbfa2e78cf7d1fe57 %global version1 0.18 # global override for all bundled sources %bcond vendor 1 %bcond libdisplay_info 0 %global forgeurl2 https://gitlab.freedesktop.org/emersion/libdisplay-info %global tag2 0.1.1 %global version2 0.1.1 %bcond libliftoff 0 %global forgeurl3 https://gitlab.freedesktop.org/emersion/libliftoff %global tag3 v0.4.1 %global version3 0.4.1 %bcond libdrm 0 %global version4 2.4.118 # real package release number %global pkgrel 1 Name: sway-git Version: 1.10~%{date}g%{lua:print(rpm.expand('%{commit}'):sub(0,7))} %forgemeta -a %{lua:for i=0,9 do rpm.undefine('distprefix' .. i) end} Release: 0.%{pkgrel}%{?dist} Summary: i3-compatible window manager for Wayland License: MIT URL: https://swaywm.org Source0: %{forgesource0} Source1: %{forgesource1} %if %{with libdisplay_info} Source2: %{forgesource2} %endif %if %{with libliftoff} Source3: %{forgesource3} %endif %if %{with libdrm} Source4: https://dri.freedesktop.org/libdrm/libdrm-%{version4}.tar.xz %endif # sway-git patches: build wlroots as static library and rename binaries Patch: sway-git-binary-names.patch # https://github.com/swaywm/sway/issues/7897 Patch: sway-git-Enable-wl_drm-by-default-and-introduce-Dno-legacy-wl.patch # conditional patches (100..) Provides: bundled(wlroots) = %{version1}-0.%{pkgrel}.%{date}git%(c=%{commit1}; echo ${c:0:7}) BuildRequires: gcc BuildRequires: gcc-c++ # wlroots: 0.59.0; sway: 0.60.0 BuildRequires: meson >= 0.60.0 BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(gdk-pixbuf-2.0) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(json-c) >= 0.13 BuildRequires: pkgconfig(libevdev) BuildRequires: pkgconfig(libinput) >= 1.21.0 BuildRequires: pkgconfig(libpcre2-8) BuildRequires: pkgconfig(libsystemd) >= 239 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(pangocairo) BuildRequires: pkgconfig(pixman-1) >= 0.42.0 #BuildRequires: pkgconfig(scdoc) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-protocols) >= 1.35 BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) >= 1.22 #BuildRequires: (pkgconfig(wlroots) >= 0.18.0 with pkgconfig(wlroots) < 0.19) BuildRequires: glslang BuildRequires: pkgconfig(hwdata) BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-renderutil) BuildRequires: pkgconfig(xkbcommon) >= 1.5.0 BuildRequires: pkgconfig(xwayland) %if %{with libdisplay_info} Provides: bundled(libdisplay-info) = %{version2} %else BuildRequires: (pkgconfig(libdisplay-info) >= %{version2} with pkgconfig(libdisplay-info) < 0.3) %endif %if %{with libliftoff} Provides: bundled(libliftoff) = %{version3} %else BuildRequires: (pkgconfig(libliftoff) >= %{version3} with pkgconfig(libliftoff) < 0.6) %endif %if %{with libdrm} Provides: bundled(libdrm) = %{version4} %else BuildRequires: pkgconfig(libdrm) >= %{version4} %endif Requires: sway %description Sway is a tiling window manager supporting Wayland compositor protocol and i3-compatible configuration. %prep %setup -q -n %{extractdir0} -a1 mkdir -p subprojects mv %{extractdir1} subprojects/wlroots %if %{with libdisplay_info} %setup -DTq -n %{extractdir0} -a2 mv %{extractdir2} subprojects/libdisplay-info %endif %if %{with libliftoff} %setup -DTq -n %{extractdir0} -a3 mv %{extractdir3} subprojects/libliftoff %endif %if %{with libdrm} %setup -DTq -n %{extractdir0} -a4 mv libdrm-%{version4} subprojects/libdrm %endif # apply unconditional patches %autopatch -p1 -M99 # apply conditional patches %build %meson \ -Dwlroots:examples=false \ -Dwlroots:xcb-errors=disabled \ -Dbash-completions=false \ -Dfish-completions=false \ -Dzsh-completions=false \ -Ddefault_library=static \ -Ddefault-wallpaper=false \ -Dman-pages=disabled \ -Dsd-bus-provider=libsystemd \ -Dwerror=false %meson_build %install %meson_install --skip-subprojects # will use config from sway package rm -rf %{buildroot}/%{_sysconfdir} # will use utilities from sway package rm -f %{buildroot}/%{_bindir}/{swaymsg,swaynag} %files %license LICENSE %doc README.md %caps(cap_sys_nice=ep) %{_bindir}/sway-git %{_bindir}/swaybar-git %{_datadir}/wayland-sessions/sway-git.desktop %changelog * Sat Oct 24 2020 Aleksei Bavshin - 1.6-0.1 - Create git snapshot package