-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrust.spec
More file actions
642 lines (546 loc) · 19.5 KB
/
Copy pathrust.spec
File metadata and controls
642 lines (546 loc) · 19.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# TODO
# - consider a rust-std package containing .../rustlib/$target
# This might allow multilib cross-compilation to work naturally.
# - package additional tools
#
# Conditional build:
%bcond_with bootstrap # bootstrap using precompiled binaries
%bcond_with full_debuginfo # full debuginfo vs only std debuginfo (full takes gigabytes of memory to build)
%bcond_without system_llvm # system LLVM
%bcond_with tests # build without tests
%bcond_without rustc_dev # build rustc-dev
# The channel can be stable, beta, or nightly
%define channel stable
%if "%{channel}" == "stable"
%define rustc_package rustc-%{version}-src
%else
%define rustc_package rustc-%{channel}-src
%endif
# To bootstrap from scratch, set the channel and date from src/stage0
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
%define bootstrap_rust 1.97.1
%define bootstrap_cargo %{bootstrap_rust}
%define bootstrap_date 2026-07-16
%ifarch x32
%define with_cross 1
%endif
%if %{without full_debuginfo}
%define _enable_debug_packages 0
%endif
%if %{with bootstrap}
%ifarch %{x8664} x32
%define rust_lld_flags -C linker-features=-lld
%endif
%endif
%define specrustflags %{?rust_lld_flags}
Summary: The Rust Programming Language
Summary(pl.UTF-8): Język programowania Rust
Name: rust
Version: 1.98.0
Release: 1
# Licenses: (rust itself) and (bundled libraries)
License: (Apache v2.0 or MIT) and (BSD and ISC and MIT)
Group: Development/Languages
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# Source0-md5: d24c6a84d3a4669f2171e9641c75417c
Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
# Source1-md5: 1289417237023f07a73a892247723b0a
Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
# Source2-md5: 155c9af1740dd8e9c24c44da5711545f
Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
# Source3-md5: 9ac04afd91f4bd9dade60fe9547c7a2d
Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
# Source4-md5: f6bdc4f0dfb53798b472a14fbf60eb80
Source5: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-armv7-unknown-linux-gnueabihf.tar.xz
# Source5-md5: 1ac8f50f460e6b510a93a8f1596a250a
URL: https://www.rust-lang.org/
# for src/compiler-rt
BuildRequires: cmake >= 3.4.3
%ifarch i686
%{?with_bootstrap:BuildRequires: cpuinfo(sse2)}
%endif
BuildRequires: curl
%ifarch %{arm} %{mips32} %{ppc}
BuildRequires: libatomic-devel
%endif
BuildRequires: lld
# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs
BuildRequires: procps
BuildRequires: python3
BuildRequires: python3-modules
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 2.052
%if %{without cross}
BuildRequires: curl-devel
BuildRequires: libgit2-devel >= 1.9.0
BuildRequires: libstdc++-devel
%if %{with system_llvm}
BuildRequires: llvm >= 21.0
BuildRequires: llvm-devel >= 21.0
%endif
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: tar >= 1:1.22
BuildRequires: xz
BuildRequires: xz-devel
BuildRequires: zlib-devel
%endif
%if %{without bootstrap}
BuildRequires: %{name} >= %{bootstrap_rust}
BuildRequires: cargo >= %{bootstrap_cargo}
BuildConflicts: %{name} > %{version}
# https://github.com/rust-lang/rust/issues/154558
BuildConflicts: %{name}-compiler-devel
%endif
%ifarch x32
BuildRequires: glibc-devel(x86-64)
BuildRequires: glibc-devel(x86-x32)
%if "%{_host_cpu}" == "x86_64"
# building on x86_64 host with --target x32-pld-linux
BuildRequires: curl-devel
BuildRequires: gcc-multilib-x32
BuildRequires: libgit2-devel >= 1.9.0
BuildRequires: libstdc++-devel
%{?with_system_llvm:BuildRequires: llvm-devel >= 21.0}
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: xz-devel
BuildRequires: zlib-devel
%else
# building x86_64-hosted crosscompiler on x32 host
BuildRequires: curl-devel(x86-64)
BuildRequires: curl-devel(x86-x32)
BuildRequires: gcc-multilib-64
BuildRequires: libgit2-devel(x86-64) >= 1.9.0
BuildRequires: libgit2-devel(x86-x32) >= 1.9.0
BuildRequires: libstdc++-multilib-64-devel
%if %{with system_llvm}
BuildRequires: llvm-devel(x86-64) >= 21.0
BuildRequires: llvm-devel(x86-x32) >= 21.0
%endif
BuildRequires: openssl-devel(x86-64)
BuildRequires: openssl-devel(x86-x32)
BuildRequires: xz-devel(x86-64)
BuildRequires: xz-devel(x86-x32)
BuildRequires: zlib-devel(x86-64)
BuildRequires: zlib-devel(x86-x32)
%endif
%endif
%{?rust_req}
# The C compiler is needed at runtime just for linking. Someday rustc might
# invoke the linker directly, and then we'll only need binutils.
# https://github.com/rust-lang/rust/issues/11937
Requires: gcc
Requires: %{name}-std%{?_isa} = %{version}-%{release}
%ifarch x32
Requires: %{name}-std(x86-64) = %{version}-%{release}
Requires: gcc-multilib-64
%endif
Obsoletes: rust-analysis < 1.69.0
# Only x86_64 and i686 are Tier 1 platforms at this time.
# x32 is Tier 2, only rust-std is available (no rustc or cargo).
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define rust_version %{version}
%ifarch x32
%define rust_triple x86_64-unknown-linux-gnux32
%define rust_host_triple x86_64-unknown-linux-gnu
%define rust_bootstrap_triple x86_64-unknown-linux-gnu
# libs in _libdir are x86_64 64bit
%define _lib lib64
%define _libdir %{_prefix}/lib64
%else
%ifarch armv6hl
%define rust_triple arm-unknown-linux-gnueabihf
%define rust_host_triple %{rust_triple}
%define rust_bootstrap_triple %{rust_triple}
%else
%ifarch armv7hl armv7hnl
%define rust_triple armv7-unknown-linux-gnueabihf
%define rust_host_triple %{rust_triple}
%define rust_bootstrap_triple %{rust_triple}
%define rust_suppl_targets thumbv7neon-unknown-linux-gnueabihf
%else
%define rust_triple %{_target_cpu}-unknown-linux-gnu
%define rust_host_triple %{rust_triple}
%define rust_bootstrap_triple %{rust_triple}
%endif
%endif
%endif
%define rust_targets %rust_triple %{?rust_suppl_targets}
%if %{without bootstrap}
%define local_rust_root %{_prefix}
%else
%define bootstrap_root rust-%{bootstrap_rust}-%{rust_bootstrap_triple}
%define local_rust_root %{_builddir}/%{rustc_package}/%{bootstrap_root}
%endif
# We're going to override --libdir when configuring to get rustlib into a
# common path, but we'll fix the shared libraries during install.
# Without this ugly hack, rust would not be able to build itself
# for non-bootstrap build, lib64 is just too complicated for it.
%define common_libdir %{_prefix}/lib
%define rustlibdir %{common_libdir}/rustlib
# once_call/once_callable non-function libstdc++ symbols
%define skip_post_check_so 'librustc.*llvm.*\.so.*'
# ALL Rust libraries are private, because they don't keep an ABI.
%define _noautoreq lib.*-[[:xdigit:]]{16}[.]so.*
%define _noautoprovfiles .*/lib.*-[[:xdigit:]]{16}[.]so.*
%define x_py { \
x_py() { \
local cmd="$1"; \
shift; \
%{?__jobs:CARGO_BUILD_JOBS=%__jobs }%{__python3} ./x.py "$cmd" %{?__jobs:-j %__jobs} "$@"; \
}; x_py }
%description
Rust is a systems programming language that runs blazingly fast,
prevents segfaults, and guarantees thread safety.
This package includes the Rust compiler, standard library, and
documentation generator.
%description -l pl.UTF-8
Rust to systemowy język programowania działający bardzo szybko,
zapobiegający naruszeniom ochrony pamięci i gwarantujący
bezpieczną wielowątkowość.
%package std
Summary: Standard library for Rust
Summary(pl.UTF-8): Standardowa biblioteka Rusta
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
%description std
Standard library for Rust.
%description std -l pl.UTF-8
Standardowa biblioteka Rusta.
%package analyzer
Summary: Implementation of Language Server Protocol for Rust
Summary(pl.UTF-8): Implementacja Language Server Protocol dla Rusta
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: %{name}-src = %{version}-%{release}
%{?rust_req}
Obsoletes: rust-rls < 1.65.0
%description analyzer
Implementation of Language Server Protocol for Rust.
%description analyzer -l pl.UTF-8
Implementacja Language Server Protocol dla Rusta.
%package debugger-common
Summary: Common debugger pretty printers for Rust
Summary(pl.UTF-8): Narzędzia wypisujące struktury Rusa wspólne dla różnych debuggerów
Group: Development/Debuggers
BuildArch: noarch
%description debugger-common
This package includes the common functionality for rust-gdb and
rust-lldb.
%description debugger-common -l pl.UTF-8
Ten pakiet zawiera wspólny kod dla pakietów rust-gdb i rust-lldb.
%package gdb
Summary: GDB pretty printers for Rust
Summary(pl.UTF-8): Ładne wypisywanie struktur Rusta w GDB
Group: Development/Debuggers
Requires: %{name}-debugger-common = %{version}-%{release}
Requires: gdb
BuildArch: noarch
%description gdb
This package includes the rust-gdb script, which allows easier
debugging of Rust programs.
%description gdb -l pl.UTF-8
Ten pakiet zawiera skrypt rust-gdb, pozwalający na łatwiejsze
odpluskwianie programów w języku Rust.
%package lldb
Summary: LLDB pretty printers for Rust
Summary(pl.UTF-8): Ładne wypisywanie struktur Rusta w LLDB
Group: Development/Debuggers
Requires: %{name}-debugger-common = %{version}-%{release}
Requires: lldb
BuildArch: noarch
%description lldb
This package includes the rust-lldb script, which allows easier
debugging of Rust programs.
%description lldb -l pl.UTF-8
Ten pakiet zawiera skrypt rust-lldb, pozwalający na łatwiejsze
odpluskwianie programów w języku Rust.
%package doc
Summary: Documentation for Rust
Summary(pl.UTF-8): Dokumentacja do Rusta
Group: Documentation
BuildArch: noarch
%description doc
This package includes HTML documentation for the Rust programming
language and its standard library.
%description doc -l pl.UTF-8
Ten pakiet zawiera dokumentację w formacie HTML do języka
programowania Rust i jego biblioteki standardowej.
%package src
Summary: Rust standard library source code
Summary(pl.UTF-8): Pliki źródłowe biblioteki standardowej Rusta
Group: Development/Tools
BuildArch: noarch
%description src
Rust standard library source code.
%description src -l pl.UTF-8
Pliki źródłowe biblioteki standardowej Rusta.
%package compiler-devel
Summary: Rust compiler development files
Summary(pl.UTF-8): Pliki deweloperskie kompilatora Rusta
Group: Development/Tools
%description compiler-devel
Development files used for embedding Rust compiler in other tools.
%description compiler-devel -l pl.UTF-8
Pliki deweloperskie używane do zagnieżdżania kompilatora Rusta w
innych narzędziach.
%package compiler-src
Summary: Rust compiler source code
Summary(pl.UTF-8): Pliki źródłowe kompilatora Rusta
Group: Development/Tools
BuildArch: noarch
%description compiler-src
Rust compiler source code.
%description compiler-src -l pl.UTF-8
Pliki źródłowe kompilatora Rusta.
%package -n cargo
Summary: Rust's package manager and build tool
Summary(pl.UTF-8): Zarządca pakietów i narzędzie do budowania
Group: Development/Tools
Requires: %{name}%{?_isa}
%{?rust_req}
%description -n cargo
Cargo is a tool that allows Rust projects to declare their various
dependencies and ensure that you'll always get a repeatable build.
%description -n cargo -l pl.UTF-8
Cargo to narzędzie pozwalające projektom w języku Rust deklarować ich
zależności i zapewniające powtarzalność procesu budowania.
%package -n bash-completion-cargo
Summary: Bash completion for cargo command
Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia cargo
Group: Applications/Shells
Requires: cargo = %{version}-%{release}
Requires: bash-completion
BuildArch: noarch
%description -n bash-completion-cargo
Bash completion for cargo command.
%description -n bash-completion-cargo -l pl.UTF-8
Bashowe dopełnianie parametrów polecenia cargo.
%package -n zsh-completion-cargo
Summary: Zsh completion for cargo command
Summary(pl.UTF-8): Dopełnianie parametrów polecenia cargo w powłoce Zsh
Group: Applications/Shells
Requires: cargo = %{version}-%{release}
Requires: zsh
BuildArch: noarch
%description -n zsh-completion-cargo
Zsh completion for cargo command.
%description -n zsh-completion-cargo -l pl.UTF-8
Dopełnianie parametrów polecenia cargo w powłoce Zsh.
%prep
%setup -q -n %{rustc_package}
%if %{with bootstrap}
%ifarch %{x8664} x32
tar xf %{SOURCE1}
%endif
%ifarch %{ix86}
tar xf %{SOURCE2}
%endif
%ifarch aarch64
tar xf %{SOURCE3}
%endif
%ifarch armv6hl
tar xf %{SOURCE4}
%endif
%ifarch armv7hl armv7hnl
tar xf %{SOURCE5}
%endif
%{__mv} %{bootstrap_root} %{bootstrap_root}-root
%{bootstrap_root}-root/install.sh \
--components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \
--prefix=%{local_rust_root} \
--disable-ldconfig
test -f %{local_rust_root}/bin/cargo
test -f %{local_rust_root}/bin/rustc
%endif
# unbundle
# We're disabling jemalloc, but rust-src still wants it.
#%{__rm} -r src/jemalloc
%if %{with system_llvm}
%{__rm} -r src/llvm-project
mkdir -p src/llvm-project/libunwind
%endif
# rust-gdb has hardcoded SYSROOT/lib -- let's make it noarch
sed -i -e 's#DIRECTORY=".*"#DIRECTORY="%{_datadir}/%{name}/etc"#' \
src/etc/rust-gdb
# cargo has hardcoded libexec path - honour rpm _libexecdir
%if "%{_libexecdir}" != "%{_prefix}/libexec"
suffix="%(echo "%{_libexecdir}" | %{__sed} -e 's,^%{_prefix}/,,')"
%{__sed} -i -e 's,"libexec","'${suffix}'",' \
src/bootstrap/src/core/download.rs \
src/bootstrap/src/core/build_steps/dist.rs \
src/bootstrap/src/core/build_steps/tool.rs
%{__sed} -i -e "s,/libexec/,/${suffix}/," src/bootstrap/bootstrap.py
%endif
# The configure macro will modify some autoconf-related files, which upsets
# cargo when it tries to verify checksums in those files. If we just truncate
# that file list, cargo won't have anything to complain about.
find vendor -name .cargo-checksum.json \
-exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
grep -lr '#!.*env bash' \
compiler/rustc_codegen_gcc/y.sh \
compiler/rustc_codegen_cranelift/scripts \
| xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,'
%build
export CC="%{__cc}"
export CXX="%{__cxx}"
export AR="%{__ar}"
%configure \
--build=%{rust_bootstrap_triple} \
--host=%{rust_host_triple} \
--target="%(echo %rust_targets | tr ' ' ,)" \
--libdir=%{common_libdir} \
--disable-codegen-tests \
--disable-debuginfo-lines \
%if %{with full_debuginfo}
--disable-debuginfo-only-std \
--enable-debuginfo \
%else
--enable-debuginfo-only-std \
--disable-debuginfo \
%endif
--disable-jemalloc \
--disable-option-checking \
--disable-rpath \
--enable-extended \
--tools=cargo,clippy,llvm-bitcode-linker,rust-analyzer,%{?with_rustc_dev:rustc-dev,}rustdoc,rustfmt,src,wasm-component-ld \
--enable-llvm-link-shared \
--enable-vendor \
--local-rust-root=%{local_rust_root} \
--llvm-root=%{_prefix} \
--release-channel=%{channel} \
--set=llvm.static-libstdcpp=false \
--set=build.optimized-compiler-builtins=false \
--set=dist.vendor=false
export RUST_BACKTRACE=full
%x_py dist --verbose
%{?with_tests:%x_py test}
%install
rm -rf $RPM_BUILD_ROOT
export CC="%{__cc}"
export CXX="%{__cxx}"
export AR="%{__ar}"
export RUSTFLAGS="%{rpmrustflags}"
export DESTDIR=$RPM_BUILD_ROOT
%x_py install
# Make sure the shared libraries are in the proper libdir
%if "%{_libdir}" != "%{common_libdir}"
mkdir -p %{buildroot}%{_libdir}
find $RPM_BUILD_ROOT%{common_libdir} -maxdepth 1 -type f -name '*.so' \
-exec mv -v -t $RPM_BUILD_ROOT%{_libdir} '{}' '+'
%endif
# The shared libraries should be executable for debuginfo extraction.
find $RPM_BUILD_ROOT%{_prefix}/ -type f -name '*.so' -exec chmod -v +x '{}' '+'
# FIXME: __os_install_post will strip the rlibs
# -- should we find a way to preserve debuginfo?
# Remove unwanted documentation files (we already package them)
%{__rm} $RPM_BUILD_ROOT%{_docdir}/rustc/README.md
%{__rm} $RPM_BUILD_ROOT%{_docdir}/rustc/COPYRIGHT*
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/rustc/licenses
# Sanitize the HTML documentation
install -d $RPM_BUILD_ROOT%{_docdir}/%{name}
%{__mv} $RPM_BUILD_ROOT%{_docdir}/{docs,%{name}}/html
find $RPM_BUILD_ROOT%{_docdir}/%{name}/html -empty -delete
find $RPM_BUILD_ROOT%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+'
# Move rust-gdb's python scripts so they're noarch
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__mv} $RPM_BUILD_ROOT%{rustlibdir}/etc $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -r $RPM_BUILD_ROOT%{rustlibdir}/src/rust/library/{backtrace/ci,compiler-builtins/{ci,etc/update-api-list.py},stdarch/ci}
# Create the path for crate-devel packages
install -d $RPM_BUILD_ROOT%{_datadir}/cargo/registry
process_manifest() {
local manifest=$1 output=$2
grep '\.\(so\|rlib\|rmeta\)$' "$manifest" | sed -e "s;file:$RPM_BUILD_ROOT;;" \
-e 's;^%{common_libdir}/\([^/]*\.so\)$;%{_libdir}/\1;' >> "$output"
}
: > rust-std.libs
for target in %{rust_targets}; do
process_manifest $RPM_BUILD_ROOT%{rustlibdir}/manifest-rust-std-$target rust-std.libs
done
: > rust.libs
process_manifest $RPM_BUILD_ROOT%{rustlibdir}/manifest-rustc rust.libs
%if %{with rustc_dev}
: > rust-compiler-devel.libs
process_manifest $RPM_BUILD_ROOT%{rustlibdir}/manifest-rustc-dev rust-compiler-devel.libs
%endif
# Remove installer artifacts (manifests, uninstall scripts, etc.)
find $RPM_BUILD_ROOT%{rustlibdir}/ -maxdepth 1 -type f -exec rm -v '{}' '+'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f rust.libs
%defattr(644,root,root,755)
%doc COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md
%attr(755,root,root) %{_bindir}/rustc
%attr(755,root,root) %{_bindir}/rustdoc
%attr(755,root,root) %{_bindir}/rustfmt
%{_mandir}/man1/rustc.1*
%{_mandir}/man1/rustdoc.1*
%dir %{rustlibdir}
%if "%rust_triple" != "%rust_host_triple"
%dir %{rustlibdir}/%rust_host_triple
%endif
%dir %{rustlibdir}/%rust_host_triple/bin
%attr(755,root,root) %{rustlibdir}/%rust_host_triple/bin/rust-objcopy
%attr(755,root,root) %{rustlibdir}/%rust_host_triple/bin/wasm-component-ld
%dir %{rustlibdir}/%rust_host_triple/bin/self-contained
%attr(755,root,root) %{rustlibdir}/%rust_host_triple/bin/self-contained/llvm-bitcode-linker
%files std -f rust-std.libs
%defattr(644,root,root,755)
%(for rust_target in %rust_targets; do
cat <<EOF
%dir %{rustlibdir}/$rust_target
%dir %{rustlibdir}/$rust_target/lib
EOF
done
)
%files analyzer
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rust-analyzer
%attr(755,root,root) %{_libexecdir}/rust-analyzer-proc-macro-srv
%files debugger-common
%defattr(644,root,root,755)
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/etc
%{_datadir}/%{name}/etc/rust_types.py
%files lldb
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rust-lldb
%{_datadir}/%{name}/etc/lldb_*.py*
%files gdb
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rust-gdb
%attr(755,root,root) %{_bindir}/rust-gdbgui
%{_datadir}/%{name}/etc/gdb_*.py*
%files doc
%defattr(644,root,root,755)
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/html
%files src
%defattr(644,root,root,755)
%{rustlibdir}/src
%if %{with rustc_dev}
%files compiler-devel -f rust-compiler-devel.libs
%defattr(644,root,root,755)
%files compiler-src
%defattr(644,root,root,755)
%{rustlibdir}/rustc-src
%endif
%files -n cargo
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/cargo
%attr(755,root,root) %{_bindir}/cargo-clippy
%attr(755,root,root) %{_bindir}/cargo-fmt
%attr(755,root,root) %{_bindir}/clippy-driver
%{_mandir}/man1/cargo*.1*
%dir %{_datadir}/cargo
%dir %{_datadir}/cargo/registry
%files -n bash-completion-cargo
%defattr(644,root,root,755)
%{_sysconfdir}/bash_completion.d/cargo
%files -n zsh-completion-cargo
%defattr(644,root,root,755)
%{zsh_compdir}/_cargo