niri
Clone
https://git.tahinli.com/Tahinli/niri.git
0 watching0 forksRustGPL-3.012.1 MiBb56079bTahinli1 day ago3019 commits
| 1 | %bcond_without check |
| 2 | |
| 3 | %global cargo_install_lib 0 |
| 4 | |
| 5 | # We want panic backtraces to work without installing the debuginfo package, |
| 6 | # so we leave the debuginfo in the main binary. |
| 7 | %global debug_package %{nil} |
| 8 | %global __strip /bin/true |
| 9 | |
| 10 | # To reduce the file size, do some convincing of rust-srpm-macros |
| 11 | # to leave alone the chosen debug settings from Cargo.toml. |
| 12 | %global rustflags_debuginfo please-remove-me |
| 13 | %global build_rustflags %{shrink: |
| 14 | -Copt-level=%rustflags_opt_level |
| 15 | -Ccodegen-units=%rustflags_codegen_units |
| 16 | -Cstrip=none |
| 17 | %{expr:0%{?_include_frame_pointers} && ("%{_arch}" != "ppc64le" && "%{_arch}" != "s390x" && "%{_arch}" != "i386") ? "-Cforce-frame-pointers=yes" : ""} |
| 18 | -Clink-arg=-Wl,-z,relro |
| 19 | -Clink-arg=-Wl,-z,now |
| 20 | %[0%{?_package_note_status} ? "-Clink-arg=%_package_note_flags" : ""] |
| 21 | --cap-lints=warn |
| 22 | } |
| 23 | |
| 24 | # Convince rust-srpm-macros to use Cargo.lock with the Smithay commit. |
| 25 | %global __cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps --locked |
| 26 | |
| 27 | %global version {{{ git_dir_version }}} |
| 28 | |
| 29 | Name: niri |
| 30 | Version: %{version} |
| 31 | Release: 1%{?dist} |
| 32 | Summary: Scrollable-tiling Wayland compositor |
| 33 | |
| 34 | SourceLicense: GPL-3.0-or-later |
| 35 | |
| 36 | # (MIT OR Apache-2.0) AND BSD-3-Clause |
| 37 | # (MIT OR Apache-2.0) AND Unicode-3.0 |
| 38 | # 0BSD OR MIT OR Apache-2.0 |
| 39 | # Apache-2.0 |
| 40 | # Apache-2.0 AND MIT |
| 41 | # Apache-2.0 OR MIT |
| 42 | # Apache-2.0 OR MIT OR Unlicense |
| 43 | # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
| 44 | # BSD-2-Clause |
| 45 | # BSD-2-Clause OR Apache-2.0 OR MIT |
| 46 | # BSD-3-Clause OR MIT OR Apache-2.0 |
| 47 | # GPL-3.0-or-later |
| 48 | # ISC |
| 49 | # MIT |
| 50 | # MIT OR Apache-2.0 |
| 51 | # MIT OR Apache-2.0 OR LGPL-2.1-or-later |
| 52 | # MIT OR Apache-2.0 OR Zlib |
| 53 | # MIT OR Zlib OR Apache-2.0 |
| 54 | # MPL-2.0 |
| 55 | # Unlicense OR MIT |
| 56 | # Zlib |
| 57 | # Zlib OR Apache-2.0 OR MIT |
| 58 | License: ((MIT OR Apache-2.0) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 AND MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Unlicense) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-3-Clause OR MIT OR Apache-2.0) AND GPL-3.0-or-later AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) |
| 59 | # LICENSE.dependencies contains a full license breakdown |
| 60 | |
| 61 | URL: https://github.com/niri-wm/niri |
| 62 | VCS: {{{ git_dir_vcs }}} |
| 63 | Source: {{{ git_dir_pack }}} |
| 64 | |
| 65 | BuildRequires: cargo-rpm-macros >= 26 |
| 66 | BuildRequires: pkgconfig(udev) |
| 67 | BuildRequires: pkgconfig(gbm) |
| 68 | BuildRequires: pkgconfig(xkbcommon) |
| 69 | BuildRequires: wayland-devel |
| 70 | BuildRequires: pkgconfig(libinput) |
| 71 | BuildRequires: pkgconfig(dbus-1) |
| 72 | BuildRequires: pkgconfig(systemd) |
| 73 | BuildRequires: pkgconfig(libseat) |
| 74 | BuildRequires: pkgconfig(libdisplay-info) |
| 75 | BuildRequires: pipewire-devel |
| 76 | BuildRequires: pango-devel |
| 77 | BuildRequires: cairo-gobject-devel |
| 78 | # Needed for pipewire-rs |
| 79 | BuildRequires: clang |
| 80 | # Needed for some tests with a surfaceless EGL renderer |
| 81 | BuildRequires: mesa-libEGL |
| 82 | |
| 83 | Requires: mesa-dri-drivers |
| 84 | Requires: mesa-libEGL |
| 85 | |
| 86 | # Loaded through dlopen |
| 87 | Requires: libwayland-server |
| 88 | |
| 89 | # Integrated Xwayland support. Not packaged on EPEL |
| 90 | %if 0%{?fedora} |
| 91 | Requires: xwayland-satellite >= 0.7 |
| 92 | %endif |
| 93 | |
| 94 | # Portal implementations used by niri |
| 95 | Recommends: xdg-desktop-portal-gtk |
| 96 | Recommends: xdg-desktop-portal-gnome |
| 97 | Recommends: gnome-keyring |
| 98 | |
| 99 | # Suggested utilities, bound in the default config |
| 100 | Recommends: alacritty |
| 101 | Recommends: fuzzel |
| 102 | Recommends: swaylock |
| 103 | Recommends: waybar |
| 104 | # Suggested utilities |
| 105 | Recommends: swaybg |
| 106 | Recommends: mako |
| 107 | Recommends: swayidle |
| 108 | |
| 109 | %description |
| 110 | A scrollable-tiling Wayland compositor. |
| 111 | |
| 112 | Windows are arranged in columns on an infinite strip going to the right. |
| 113 | Opening a new window never causes existing windows to resize. |
| 114 | |
| 115 | %prep |
| 116 | {{{ git_dir_setup_macro }}} |
| 117 | |
| 118 | %cargo_prep -N |
| 119 | |
| 120 | # We're doing an online build. |
| 121 | sed -i 's/^offline = true$//' .cargo/config.toml |
| 122 | |
| 123 | # Final step in leaving alone our debug settings. |
| 124 | sed -i 's/.*please-remove-me$//' .cargo/config.toml |
| 125 | |
| 126 | # Set the commit string. |
| 127 | sed -i 's/\[env\]/[env]\nNIRI_BUILD_COMMIT="%{version}"/' .cargo/config.toml |
| 128 | |
| 129 | %build |
| 130 | %cargo_build |
| 131 | |
| 132 | target/rpm/niri completions bash > ./niri |
| 133 | target/rpm/niri completions fish > ./niri.fish |
| 134 | target/rpm/niri completions zsh > ./_niri |
| 135 | |
| 136 | %install |
| 137 | %cargo_install |
| 138 | |
| 139 | install -Dm755 -t %{buildroot}%{_bindir} ./resources/niri-session |
| 140 | install -Dm644 -t %{buildroot}%{_datadir}/wayland-sessions ./resources/niri.desktop |
| 141 | install -Dm644 -t %{buildroot}%{_datadir}/xdg-desktop-portal ./resources/niri-portals.conf |
| 142 | install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri.service |
| 143 | install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri-shutdown.target |
| 144 | |
| 145 | install -Dm644 -t %{buildroot}%{bash_completions_dir} ./niri |
| 146 | install -Dm644 -t %{buildroot}%{fish_completions_dir} ./niri.fish |
| 147 | install -Dm644 -t %{buildroot}%{zsh_completions_dir} ./_niri |
| 148 | |
| 149 | %if %{with check} |
| 150 | %check |
| 151 | %cargo_test -- --workspace --exclude niri-visual-tests |
| 152 | %endif |
| 153 | |
| 154 | %files |
| 155 | %license LICENSE |
| 156 | %doc README.md |
| 157 | %doc resources/default-config.kdl |
| 158 | %doc docs/wiki |
| 159 | %{_bindir}/niri |
| 160 | %{_bindir}/niri-session |
| 161 | %{_datadir}/wayland-sessions/niri.desktop |
| 162 | %dir %{_datadir}/xdg-desktop-portal |
| 163 | %{_datadir}/xdg-desktop-portal/niri-portals.conf |
| 164 | %{_userunitdir}/niri.service |
| 165 | %{_userunitdir}/niri-shutdown.target |
| 166 | %{bash_completions_dir}/niri |
| 167 | %{fish_completions_dir}/niri.fish |
| 168 | %{zsh_completions_dir}/_niri |
| 169 | |
| 170 | %changelog |
| 171 | {{{ git_dir_changelog }}} |
| 172 |