forge
Explore
Log in

Don't you dare go Hollow

niri

Clone
★ 0

0 watching0 forksRustGPL-3.012.1 MiB567a100Tahinli1 month ago2998 commits

niri.spec.rpkg172 lines, 5.4 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# (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
58License: ((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
61URL: https://github.com/niri-wm/niri
62VCS: {{{ git_dir_vcs }}}
63Source: {{{ git_dir_pack }}}
64
65BuildRequires: cargo-rpm-macros >= 26
66BuildRequires: pkgconfig(udev)
67BuildRequires: pkgconfig(gbm)
68BuildRequires: pkgconfig(xkbcommon)
69BuildRequires: wayland-devel
70BuildRequires: pkgconfig(libinput)
71BuildRequires: pkgconfig(dbus-1)
72BuildRequires: pkgconfig(systemd)
73BuildRequires: pkgconfig(libseat)
74BuildRequires: pkgconfig(libdisplay-info)
75BuildRequires: pipewire-devel
76BuildRequires: pango-devel
77BuildRequires: cairo-gobject-devel
78# Needed for pipewire-rs
79BuildRequires: clang
80# Needed for some tests with a surfaceless EGL renderer
81BuildRequires: mesa-libEGL
82
83Requires: mesa-dri-drivers
84Requires: mesa-libEGL
85
86# Loaded through dlopen
87Requires: libwayland-server
88
89# Integrated Xwayland support. Not packaged on EPEL
90%if 0%{?fedora}
91Requires: xwayland-satellite >= 0.7
92%endif
93
94# Portal implementations used by niri
95Recommends: xdg-desktop-portal-gtk
96Recommends: xdg-desktop-portal-gnome
97Recommends: gnome-keyring
98
99# Suggested utilities, bound in the default config
100Recommends: alacritty
101Recommends: fuzzel
102Recommends: swaylock
103Recommends: waybar
104# Suggested utilities
105Recommends: swaybg
106Recommends: mako
107Recommends: swayidle
108
109%description
110A scrollable-tiling Wayland compositor.
111
112Windows are arranged in columns on an infinite strip going to the right.
113Opening 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.
121sed -i 's/^offline = true$//' .cargo/config.toml
122
123# Final step in leaving alone our debug settings.
124sed -i 's/.*please-remove-me$//' .cargo/config.toml
125
126# Set the commit string.
127sed -i 's/\[env\]/[env]\nNIRI_BUILD_COMMIT="%{version}"/' .cargo/config.toml
128
129%build
130%cargo_build
131
132target/rpm/niri completions bash > ./niri
133target/rpm/niri completions fish > ./niri.fish
134target/rpm/niri completions zsh > ./_niri
135
136%install
137%cargo_install
138
139install -Dm755 -t %{buildroot}%{_bindir} ./resources/niri-session
140install -Dm644 -t %{buildroot}%{_datadir}/wayland-sessions ./resources/niri.desktop
141install -Dm644 -t %{buildroot}%{_datadir}/xdg-desktop-portal ./resources/niri-portals.conf
142install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri.service
143install -Dm644 -t %{buildroot}%{_userunitdir} ./resources/niri-shutdown.target
144
145install -Dm644 -t %{buildroot}%{bash_completions_dir} ./niri
146install -Dm644 -t %{buildroot}%{fish_completions_dir} ./niri.fish
147install -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