forge
Explore
Log in

Don't you dare go Hollow

niri

Clone
★ 0

0 watching0 forksRustGPL-3.012.1 MiB055a94dIvan Molodetskikh1 year ago2247 commits

niri.spec.rpkg150 lines, 4.7 KiBHistoryRawDownload
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
29Name: niri
30Version: %{version}
31Release: 1%{?dist}
32Summary: Scrollable-tiling Wayland compositor
33
34SourceLicense: 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
57License: (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
60URL: https://github.com/YaLTeR/niri
61VCS: {{{ git_dir_vcs }}}
62Source: {{{ git_dir_pack }}}
63
64BuildRequires: cargo-rpm-macros >= 26
65BuildRequires: pkgconfig(udev)
66BuildRequires: pkgconfig(gbm)
67BuildRequires: pkgconfig(xkbcommon)
68BuildRequires: wayland-devel
69BuildRequires: pkgconfig(libinput)
70BuildRequires: pkgconfig(dbus-1)
71BuildRequires: pkgconfig(systemd)
72BuildRequires: pkgconfig(libseat)
73BuildRequires: pkgconfig(libdisplay-info)
74BuildRequires: pipewire-devel
75BuildRequires: pango-devel
76BuildRequires: cairo-gobject-devel
77# Needed for pipewire-rs
78BuildRequires: clang
79
80Requires: mesa-dri-drivers
81Requires: mesa-libEGL
82
83# Portal implementations used by niri
84Recommends: xdg-desktop-portal-gtk
85Recommends: xdg-desktop-portal-gnome
86Recommends: gnome-keyring
87
88# Suggested utilities, bound in the default config
89Recommends: alacritty
90Recommends: fuzzel
91Recommends: swaylock
92Recommends: waybar
93# Suggested utilities
94Recommends: swaybg
95Recommends: mako
96Recommends: swayidle
97
98%description
99A scrollable-tiling Wayland compositor.
100
101Windows are arranged in columns on an infinite strip going to the right.
102Opening 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.
110sed -i 's/^offline = true$//' .cargo/config.toml
111
112# Final step in leaving alone our debug settings.
113sed -i 's/.*please-remove-me$//' .cargo/config.toml
114
115# Set the commit string.
116sed -i 's/\[env\]/[env]\nNIRI_BUILD_COMMIT="%{version}"/' .cargo/config.toml
117
118%build
119%cargo_build
120
121%install
122%cargo_install
123
124install -Dm755 -t %{buildroot}%{_bindir} ./resources/niri-session
125install -Dm644 -t %{buildroot}%{_datadir}/wayland-sessions ./resources/niri.desktop
126install -Dm644 -t %{buildroot}%{_datadir}/xdg-desktop-portal ./resources/niri-portals.conf
127install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri.service
128install -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