niri
Clone
https://git.tahinli.com/Tahinli/niri.git
0 watching0 forksRustGPL-3.012.1 MiB055a94dIvan Molodetskikh1 year ago2247 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 | # 0BSD OR MIT OR Apache-2.0 |
| 37 | # Apache-2.0 |
| 38 | # Apache-2.0 OR BSL-1.0 |
| 39 | # Apache-2.0 OR MIT |
| 40 | # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
| 41 | # BSD-2-Clause |
| 42 | # BSD-2-Clause OR Apache-2.0 OR MIT |
| 43 | # BSD-3-Clause OR MIT OR Apache-2.0 |
| 44 | # GPL-3.0-or-later |
| 45 | # ISC |
| 46 | # MIT |
| 47 | # MIT AND (MIT OR Apache-2.0) |
| 48 | # MIT OR Apache-2.0 |
| 49 | # (MIT OR Apache-2.0) AND BSD-3-Clause |
| 50 | # (MIT OR Apache-2.0) AND Unicode-3.0 |
| 51 | # MIT OR Apache-2.0 OR Zlib |
| 52 | # MIT OR Zlib OR Apache-2.0 |
| 53 | # MPL-2.0 |
| 54 | # Unicode-3.0 |
| 55 | # Unlicense OR MIT |
| 56 | # Zlib OR Apache-2.0 OR MIT |
| 57 | License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) 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 AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND ((MIT OR Apache-2.0) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND (MPL-2.0) AND (Unicode-3.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) |
| 58 | # LICENSE.dependencies contains a full license breakdown |
| 59 | |
| 60 | URL: https://github.com/YaLTeR/niri |
| 61 | VCS: {{{ git_dir_vcs }}} |
| 62 | Source: {{{ git_dir_pack }}} |
| 63 | |
| 64 | BuildRequires: cargo-rpm-macros >= 26 |
| 65 | BuildRequires: pkgconfig(udev) |
| 66 | BuildRequires: pkgconfig(gbm) |
| 67 | BuildRequires: pkgconfig(xkbcommon) |
| 68 | BuildRequires: wayland-devel |
| 69 | BuildRequires: pkgconfig(libinput) |
| 70 | BuildRequires: pkgconfig(dbus-1) |
| 71 | BuildRequires: pkgconfig(systemd) |
| 72 | BuildRequires: pkgconfig(libseat) |
| 73 | BuildRequires: pkgconfig(libdisplay-info) |
| 74 | BuildRequires: pipewire-devel |
| 75 | BuildRequires: pango-devel |
| 76 | BuildRequires: cairo-gobject-devel |
| 77 | # Needed for pipewire-rs |
| 78 | BuildRequires: clang |
| 79 | |
| 80 | Requires: mesa-dri-drivers |
| 81 | Requires: mesa-libEGL |
| 82 | |
| 83 | # Portal implementations used by niri |
| 84 | Recommends: xdg-desktop-portal-gtk |
| 85 | Recommends: xdg-desktop-portal-gnome |
| 86 | Recommends: gnome-keyring |
| 87 | |
| 88 | # Suggested utilities, bound in the default config |
| 89 | Recommends: alacritty |
| 90 | Recommends: fuzzel |
| 91 | Recommends: swaylock |
| 92 | Recommends: waybar |
| 93 | # Suggested utilities |
| 94 | Recommends: swaybg |
| 95 | Recommends: mako |
| 96 | Recommends: swayidle |
| 97 | |
| 98 | %description |
| 99 | A scrollable-tiling Wayland compositor. |
| 100 | |
| 101 | Windows are arranged in columns on an infinite strip going to the right. |
| 102 | Opening a new window never causes existing windows to resize. |
| 103 | |
| 104 | %prep |
| 105 | {{{ git_dir_setup_macro }}} |
| 106 | |
| 107 | %cargo_prep -N |
| 108 | |
| 109 | # We're doing an online build. |
| 110 | sed -i 's/^offline = true$//' .cargo/config.toml |
| 111 | |
| 112 | # Final step in leaving alone our debug settings. |
| 113 | sed -i 's/.*please-remove-me$//' .cargo/config.toml |
| 114 | |
| 115 | # Set the commit string. |
| 116 | sed -i 's/\[env\]/[env]\nNIRI_BUILD_COMMIT="%{version}"/' .cargo/config.toml |
| 117 | |
| 118 | %build |
| 119 | %cargo_build |
| 120 | |
| 121 | %install |
| 122 | %cargo_install |
| 123 | |
| 124 | install -Dm755 -t %{buildroot}%{_bindir} ./resources/niri-session |
| 125 | install -Dm644 -t %{buildroot}%{_datadir}/wayland-sessions ./resources/niri.desktop |
| 126 | install -Dm644 -t %{buildroot}%{_datadir}/xdg-desktop-portal ./resources/niri-portals.conf |
| 127 | install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri.service |
| 128 | install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri-shutdown.target |
| 129 | |
| 130 | %if %{with check} |
| 131 | %check |
| 132 | %cargo_test -- --workspace --exclude niri-visual-tests |
| 133 | %endif |
| 134 | |
| 135 | %files |
| 136 | %license LICENSE |
| 137 | %doc README.md |
| 138 | %doc resources/default-config.kdl |
| 139 | %doc wiki |
| 140 | %{_bindir}/niri |
| 141 | %{_bindir}/niri-session |
| 142 | %{_datadir}/wayland-sessions/niri.desktop |
| 143 | %dir %{_datadir}/xdg-desktop-portal |
| 144 | %{_datadir}/xdg-desktop-portal/niri-portals.conf |
| 145 | %{_userunitdir}/niri.service |
| 146 | %{_userunitdir}/niri-shutdown.target |
| 147 | |
| 148 | %changelog |
| 149 | {{{ git_dir_changelog }}} |
| 150 |