]> git.pld-linux.org Git - packages/rust.git/blame - rust.spec
up to 1.71.0
[packages/rust.git] / rust.spec
CommitLineData
e361528e
ER
1# TODO
2# - consider a rust-std package containing .../rustlib/$target
3# This might allow multilib cross-compilation to work naturally.
8a758d34 4# - package additional tools
e361528e
ER
5#
6# Conditional build:
e8f16183 7%bcond_with bootstrap # bootstrap using precompiled binaries
398b58dd 8%bcond_with full_debuginfo # full debuginfo vs only std debuginfo (full takes gigabytes of memory to build)
5b9d67b0 9%bcond_without system_llvm # system LLVM
cace5bf9 10%bcond_with tests # build without tests
e361528e 11
8a073211
JR
12# The channel can be stable, beta, or nightly
13%define channel stable
14
e361528e 15%if "%{channel}" == "stable"
8a073211 16%define rustc_package rustc-%{version}-src
e361528e 17%else
8a073211 18%define rustc_package rustc-%{channel}-src
e361528e
ER
19%endif
20
fc3be51a 21# To bootstrap from scratch, set the channel and date from src/stage0.json
e361528e
ER
22# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
23# or nightly wants some beta-YYYY-MM-DD
642cf712 24%define bootstrap_rust 1.70.0
aea1d260 25%define bootstrap_cargo %{bootstrap_rust}
642cf712 26%define bootstrap_date 2023-06-01
e361528e 27
badbe44d 28%ifarch x32
2eb30149 29%define with_cross 1
badbe44d 30%endif
c19e7faa
JP
31
32%if %{without full_debuginfo}
33%define _enable_debug_packages 0
34%endif
35
e361528e 36Summary: The Rust Programming Language
e8f16183 37Summary(pl.UTF-8): Język programowania Rust
e361528e 38Name: rust
642cf712 39Version: 1.71.0
45dc2777 40Release: 1
d1b96fd8 41# Licenses: (rust itself) and (bundled libraries)
e8f16183 42License: (Apache v2.0 or MIT) and (BSD and ISC and MIT)
e361528e 43Group: Development/Languages
be28e1f1 44Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
642cf712 45# Source0-md5: 81ae525767680c1680bad985ecc35bff
be28e1f1 46Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
642cf712 47# Source1-md5: afabe6d2054187af74998fd42c516717
be28e1f1 48Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
642cf712 49# Source2-md5: 2d4b19e6e0994fea57c837460612f8d7
9eb0511e 50Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
642cf712 51# Source3-md5: 329cfb044bff54ac749983285bf4819a
1fe729c8 52Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
642cf712 53# Source4-md5: ba90a8fd5f8af3dd73599434e9f5083f
ad044650 54Source5: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-armv7-unknown-linux-gnueabihf.tar.xz
642cf712
JP
55# Source5-md5: e8a4cf787e2d82b2ba7b2e63800a1d1a
56Patch0: lint_docs_libs.patch
57Patch1: bash_comp_location.patch
e361528e 58URL: https://www.rust-lang.org/
e8f16183
JB
59# for src/compiler-rt
60BuildRequires: cmake >= 3.4.3
e361528e 61BuildRequires: curl
dba8190b
JP
62%ifarch %{arm} %{mips32} %{ppc}
63BuildRequires: libatomic-devel
64%endif
2eb30149
JB
65# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs
66BuildRequires: procps
e65d284f
JP
67BuildRequires: python3
68BuildRequires: python3-modules
fc3be51a 69BuildRequires: rpm-build >= 4.6
2eb30149
JB
70BuildRequires: rpmbuild(macros) >= 1.752
71%if %{without cross}
8f176645 72BuildRequires: curl-devel
8745efaa 73BuildRequires: libgit2-devel >= 1.4.0
d1b96fd8 74BuildRequires: libstdc++-devel
2cec66d3 75%if %{with system_llvm}
80e24d19
JP
76BuildRequires: llvm >= 14.0
77BuildRequires: llvm-devel >= 14.0
2cec66d3 78%endif
7da6653d 79BuildRequires: openssl-devel >= 1.0.1
8a54bb92
JP
80BuildRequires: tar >= 1:1.22
81BuildRequires: xz
79a067de 82BuildRequires: xz-devel
e361528e 83BuildRequires: zlib-devel
2eb30149 84%endif
e361528e 85%if %{without bootstrap}
d6d4cb2b 86BuildRequires: %{name} >= %{bootstrap_rust}
d1b96fd8 87BuildRequires: cargo >= %{bootstrap_cargo}
ff5a5e0b 88BuildConflicts: %{name} > %{version}
e361528e 89%endif
2eb30149 90%ifarch x32
cd0c1484
JR
91BuildRequires: glibc-devel(x86-64)
92BuildRequires: glibc-devel(x86-x32)
2eb30149
JB
93%if "%{_host_cpu}" == "x86_64"
94# building on x86_64 host with --target x32-pld-linux
8f176645 95BuildRequires: curl-devel
2eb30149 96BuildRequires: gcc-multilib-x32
8745efaa 97BuildRequires: libgit2-devel >= 1.4.0
2eb30149 98BuildRequires: libstdc++-devel
80e24d19 99%{?with_system_llvm:BuildRequires: llvm-devel >= 14.0}
2eb30149 100BuildRequires: openssl-devel >= 1.0.1
79a067de 101BuildRequires: xz-devel
2eb30149
JB
102BuildRequires: zlib-devel
103%else
104# building x86_64-hosted crosscompiler on x32 host
56b25e8b 105BuildRequires: curl-devel(x86-64)
cd0c1484 106BuildRequires: curl-devel(x86-x32)
2eb30149 107BuildRequires: gcc-multilib-64
8745efaa
JP
108BuildRequires: libgit2-devel(x86-64) >= 1.4.0
109BuildRequires: libgit2-devel(x86-x32) >= 1.4.0
2eb30149 110BuildRequires: libstdc++-multilib-64-devel
cd0c1484 111%if %{with system_llvm}
80e24d19
JP
112BuildRequires: llvm-devel(x86-64) >= 14.0
113BuildRequires: llvm-devel(x86-x32) >= 14.0
cd0c1484 114%endif
56b25e8b 115BuildRequires: openssl-devel(x86-64)
cd0c1484 116BuildRequires: openssl-devel(x86-x32)
79a067de
JP
117BuildRequires: xz-devel(x86-64)
118BuildRequires: xz-devel(x86-x32)
56b25e8b 119BuildRequires: zlib-devel(x86-64)
cd0c1484 120BuildRequires: zlib-devel(x86-x32)
2eb30149
JB
121%endif
122%endif
e361528e
ER
123# The C compiler is needed at runtime just for linking. Someday rustc might
124# invoke the linker directly, and then we'll only need binutils.
125# https://github.com/rust-lang/rust/issues/11937
126Requires: gcc
cd0c1484
JR
127Requires: %{name}-std%{?_isa} = %{version}-%{release}
128%ifarch x32
129Requires: %{name}-std(x86-64) = %{version}-%{release}
417178e1 130Requires: gcc-multilib-64
cd0c1484 131%endif
80e24d19 132Obsoletes: rust-analysis < 1.69.0
e361528e 133# Only x86_64 and i686 are Tier 1 platforms at this time.
badbe44d 134# x32 is Tier 2, only rust-std is available (no rustc or cargo).
4f433f76 135# https://doc.rust-lang.org/nightly/rustc/platform-support.html
1fe729c8 136ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
6ed79af8 137BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
e361528e 138
e064fbd0 139%ifarch x32
badbe44d 140%define rust_triple x86_64-unknown-linux-gnux32
2eb30149 141%define rust_host_triple x86_64-unknown-linux-gnu
badbe44d 142%define rust_bootstrap_triple x86_64-unknown-linux-gnu
a973dc7e
JR
143# libs in _libdir are x86_64 64bit
144%define _lib lib64
145%define _libdir %{_prefix}/lib64
e064fbd0 146%else
ad044650 147%ifarch armv6hl
1fe729c8
JP
148%define rust_triple arm-unknown-linux-gnueabihf
149%define rust_host_triple %{rust_triple}
150%define rust_bootstrap_triple %{rust_triple}
151%else
ad044650
JP
152%ifarch armv7hl armv7hnl
153%define rust_triple armv7-unknown-linux-gnueabihf
154%define rust_host_triple %{rust_triple}
155%define rust_bootstrap_triple %{rust_triple}
6c4856ce 156%define rust_suppl_targets thumbv7neon-unknown-linux-gnueabihf
ad044650 157%else
badbe44d 158%define rust_triple %{_target_cpu}-unknown-linux-gnu
2eb30149
JB
159%define rust_host_triple %{rust_triple}
160%define rust_bootstrap_triple %{rust_triple}
e064fbd0 161%endif
1fe729c8 162%endif
ad044650 163%endif
e361528e 164
62473c95
JP
165%define rust_targets %rust_triple %{?rust_suppl_targets}
166
e361528e 167%if %{without bootstrap}
8a073211 168%define local_rust_root %{_prefix}
e361528e 169%else
badbe44d 170%define bootstrap_root rust-%{bootstrap_rust}-%{rust_bootstrap_triple}
8a073211 171%define local_rust_root %{_builddir}/%{rustc_package}/%{bootstrap_root}
e361528e
ER
172%endif
173
18a1004b
JR
174# We're going to override --libdir when configuring to get rustlib into a
175# common path, but we'll fix the shared libraries during install.
5b9d67b0 176# Without this ugly hack, rust would not be able to build itself
18a1004b
JR
177# for non-bootstrap build, lib64 is just too complicated for it.
178%define common_libdir %{_prefix}/lib
179%define rustlibdir %{common_libdir}/rustlib
180
19f98749 181# once_call/once_callable non-function libstdc++ symbols
8f4c23f4 182%define skip_post_check_so 'librustc.*llvm.*\.so.*'
19f98749 183
e361528e 184# ALL Rust libraries are private, because they don't keep an ABI.
8a073211
JR
185%define _noautoreqfiles lib.*-[[:xdigit:]]{8}[.]so.*
186%define _noautoprovfiles lib.*-[[:xdigit:]]{8}[.]so.*
e361528e 187
37765656
JP
188%define x_py { \
189 x_py() { \
190 local cmd="$1"; \
191 shift; \
e65d284f 192 %{?__jobs:CARGO_BUILD_JOBS=%__jobs }%{__python3} ./x.py "$cmd" %{?__jobs:-j %__jobs} "$@"; \
37765656
JP
193 }; x_py }
194
195
e361528e
ER
196%description
197Rust is a systems programming language that runs blazingly fast,
198prevents segfaults, and guarantees thread safety.
199
200This package includes the Rust compiler, standard library, and
201documentation generator.
202
e8f16183
JB
203%description -l pl.UTF-8
204Rust to systemowy język programowania działający bardzo szybko,
205zapobiegający naruszeniom ochrony pamięci i gwarantujący
206bezpieczną wielowątkowość.
207
cd0c1484
JR
208%package std
209Summary: Standard library for Rust
210Summary(pl.UTF-8): Standardowa biblioteka Rusta
211Group: Development/Tools
89a1e043 212Requires: %{name} = %{version}-%{release}
cd0c1484
JR
213
214%description std
215Standard library for Rust.
216
217%description std -l pl.UTF-8
218Standardowa biblioteka Rusta.
219
f397d93b 220%package analyzer
4079dca2
JP
221Summary: Implementation of Language Server Protocol for Rust
222Summary(pl.UTF-8): Implementacja Language Server Protocol dla Rusta
223Group: Development/Tools
224Requires: %{name} = %{version}-%{release}
225Obsoletes: rust-rls < 1.65.0
f397d93b
JP
226
227%description analyzer
228Implementation of Language Server Protocol for Rust.
229
230%description analyzer -l pl.UTF-8
231Implementacja Language Server Protocol dla Rusta.
232
d1b96fd8
JR
233%package debugger-common
234Summary: Common debugger pretty printers for Rust
e8f16183 235Summary(pl.UTF-8): Narzędzia wypisujące struktury Rusa wspólne dla różnych debuggerów
d1b96fd8 236Group: Development/Debuggers
e67020b3 237BuildArch: noarch
d1b96fd8
JR
238
239%description debugger-common
e8f16183
JB
240This package includes the common functionality for rust-gdb and
241rust-lldb.
242
243%description debugger-common -l pl.UTF-8
244Ten pakiet zawiera wspólny kod dla pakietów rust-gdb i rust-lldb.
d1b96fd8 245
e361528e
ER
246%package gdb
247Summary: GDB pretty printers for Rust
e8f16183 248Summary(pl.UTF-8): Ładne wypisywanie struktur Rusta w GDB
d1b96fd8
JR
249Group: Development/Debuggers
250Requires: %{name}-debugger-common = %{version}-%{release}
e361528e 251Requires: gdb
e67020b3 252BuildArch: noarch
e361528e
ER
253
254%description gdb
255This package includes the rust-gdb script, which allows easier
256debugging of Rust programs.
257
e8f16183
JB
258%description gdb -l pl.UTF-8
259Ten pakiet zawiera skrypt rust-gdb, pozwalający na łatwiejsze
260odpluskwianie programów w języku Rust.
261
d1b96fd8
JR
262%package lldb
263Summary: LLDB pretty printers for Rust
e8f16183 264Summary(pl.UTF-8): Ładne wypisywanie struktur Rusta w LLDB
d1b96fd8
JR
265Group: Development/Debuggers
266Requires: %{name}-debugger-common = %{version}-%{release}
267Requires: lldb
e67020b3 268BuildArch: noarch
d1b96fd8
JR
269
270%description lldb
271This package includes the rust-lldb script, which allows easier
272debugging of Rust programs.
273
e8f16183
JB
274%description lldb -l pl.UTF-8
275Ten pakiet zawiera skrypt rust-lldb, pozwalający na łatwiejsze
276odpluskwianie programów w języku Rust.
277
e361528e
ER
278%package doc
279Summary: Documentation for Rust
e8f16183 280Summary(pl.UTF-8): Dokumentacja do Rusta
d1b96fd8 281Group: Documentation
e67020b3 282BuildArch: noarch
e361528e
ER
283
284%description doc
285This package includes HTML documentation for the Rust programming
286language and its standard library.
287
e8f16183
JB
288%description doc -l pl.UTF-8
289Ten pakiet zawiera dokumentację w formacie HTML do języka
290programowania Rust i jego biblioteki standardowej.
291
8a758d34
JP
292%package -n cargo
293Summary: Rust's package manager and build tool
294Summary(pl.UTF-8): Zarządca pakietów i narzędzie do budowania
295Group: Development/Tools
cd0c1484 296Requires: %{name}%{?_isa}
8a758d34
JP
297
298%description -n cargo
299Cargo is a tool that allows Rust projects to declare their various
300dependencies and ensure that you'll always get a repeatable build.
301
302%description -n cargo -l pl.UTF-8
303Cargo to narzędzie pozwalające projektom w języku Rust deklarować ich
304zależności i zapewniające powtarzalność procesu budowania.
305
6ed79af8
JB
306%package -n bash-completion-cargo
307Summary: Bash completion for cargo command
308Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia cargo
309Group: Applications/Shells
310Requires: %{name} = %{version}-%{release}
311Requires: bash-completion
449de7a9 312BuildArch: noarch
6ed79af8
JB
313
314%description -n bash-completion-cargo
315Bash completion for cargo command.
316
317%description -n bash-completion-cargo -l pl.UTF-8
318Bashowe dopełnianie parametrów polecenia cargo.
319
8a758d34
JP
320%package -n zsh-completion-cargo
321Summary: Zsh completion for cargo command
322Summary(pl.UTF-8): Dopełnianie parametrów polecenia cargo w powłoce Zsh
323Group: Applications/Shells
324Requires: %{name} = %{version}-%{release}
6ed79af8 325Requires: zsh
166962a5 326BuildArch: noarch
8a758d34
JP
327
328%description -n zsh-completion-cargo
329Zsh completion for cargo command.
330
331%description -n zsh-completion-cargo -l pl.UTF-8
332Dopełnianie parametrów polecenia cargo w powłoce Zsh.
333
e361528e
ER
334%prep
335%setup -q -n %{rustc_package}
642cf712
JP
336%patch0 -p1
337%patch1 -p1
b5eceb5e 338
e361528e 339%if %{with bootstrap}
a1735efb 340%ifarch %{x8664} x32
e361528e
ER
341tar xf %{SOURCE1}
342%endif
343%ifarch %{ix86}
344tar xf %{SOURCE2}
345%endif
c160f211 346%ifarch aarch64
9eb0511e 347tar xf %{SOURCE3}
c160f211 348%endif
ad044650 349%ifarch armv6hl
1fe729c8
JP
350tar xf %{SOURCE4}
351%endif
ad044650
JP
352%ifarch armv7hl armv7hnl
353tar xf %{SOURCE5}
354%endif
d6d4cb2b
JR
355%{__mv} %{bootstrap_root} %{bootstrap_root}-root
356%{bootstrap_root}-root/install.sh \
badbe44d 357 --components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \
d6d4cb2b
JR
358 --prefix=%{local_rust_root} \
359 --disable-ldconfig
360test -f %{local_rust_root}/bin/cargo
e361528e
ER
361test -f %{local_rust_root}/bin/rustc
362%endif
363
364# unbundle
d4b51567 365# We're disabling jemalloc, but rust-src still wants it.
5b9d67b0 366#%{__rm} -r src/jemalloc
9e7854c5
JP
367%if %{with system_llvm}
368%{__rm} -r src/llvm-project
369mkdir -p src/llvm-project/libunwind
370%endif
e361528e 371
e361528e
ER
372# rust-gdb has hardcoded SYSROOT/lib -- let's make it noarch
373sed -i -e 's#DIRECTORY=".*"#DIRECTORY="%{_datadir}/%{name}/etc"#' \
374 src/etc/rust-gdb
375
4b354bd7
JB
376# cargo has hardcoded libexec path - honour rpm _libexecdir
377%if "%{_libexecdir}" != "%{_prefix}/libexec"
378suffix="%(echo "%{_libexecdir}" | %{__sed} -e 's,^%{_prefix}/,,')"
379%{__sed} -i -e 's,"libexec","'${suffix}'",' \
380 src/bootstrap/dist.rs \
f8cd0454 381 src/tools/cargo/src/cargo/util/auth.rs
4b354bd7
JB
382%{__sed} -i -e 's,libexec/,'${suffix}'/,' src/tools/cargo/tests/testsuite/credential_process.rs
383%endif
384
5ee06aa0
JR
385# The configure macro will modify some autoconf-related files, which upsets
386# cargo when it tries to verify checksums in those files. If we just truncate
387# that file list, cargo won't have anything to complain about.
fe49e3fc 388find vendor -name .cargo-checksum.json \
5ee06aa0 389 -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
e361528e 390
e361528e 391%build
863a59ff
JP
392export CC="%{__cc}"
393export CXX="%{__cxx}"
394export AR="%{__ar}"
e361528e 395%configure \
2eb30149
JB
396 --build=%{rust_bootstrap_triple} \
397 --host=%{rust_host_triple} \
62473c95 398 --target="%(echo %rust_targets | tr ' ' ,)" \
18a1004b 399 --libdir=%{common_libdir} \
e8f16183 400 --disable-codegen-tests \
5ee06aa0 401 --disable-debuginfo-lines \
5b9d67b0 402%if %{with full_debuginfo}
5ee06aa0 403 --disable-debuginfo-only-std \
e361528e 404 --enable-debuginfo \
5b9d67b0
JB
405%else
406 --enable-debuginfo-only-std \
407 --disable-debuginfo \
408%endif
6ed79af8
JB
409 --disable-jemalloc \
410 --disable-option-checking \
411 --disable-rpath \
8a758d34 412 --enable-extended \
e8f16183 413 --enable-llvm-link-shared \
d6d4cb2b 414 --enable-vendor \
6ed79af8 415 --local-rust-root=%{local_rust_root} \
e8f16183 416 --llvm-root=%{_prefix} \
595dfba2
JP
417 --release-channel=%{channel} \
418 --set=llvm.static-libstdcpp=false
e361528e 419
37765656
JP
420export RUST_BACKTRACE=full
421%x_py dist --verbose
e361528e 422
37765656 423%{?with_tests:%x_py test}
8a073211 424
e361528e
ER
425%install
426rm -rf $RPM_BUILD_ROOT
e361528e 427
13ab0532
JP
428export CC="%{__cc}"
429export CXX="%{__cxx}"
430export AR="%{__ar}"
37765656
JP
431export DESTDIR=$RPM_BUILD_ROOT
432%x_py install
e361528e 433
18a1004b
JR
434# Make sure the shared libraries are in the proper libdir
435%if "%{_libdir}" != "%{common_libdir}"
436mkdir -p %{buildroot}%{_libdir}
437find $RPM_BUILD_ROOT%{common_libdir} -maxdepth 1 -type f -name '*.so' \
438 -exec mv -v -t $RPM_BUILD_ROOT%{_libdir} '{}' '+'
439%endif
440
d1b96fd8 441# The shared libraries should be executable for debuginfo extraction.
e361528e
ER
442find $RPM_BUILD_ROOT%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+'
443
d1b96fd8
JR
444# The libdir libraries are identical to those under rustlib/. It's easier on
445# library loading if we keep them in libdir, but we do need them in rustlib/
446# to support dynamic linking for compiler plugins, so we'll symlink.
62473c95
JP
447for rust_target in %rust_targets; do
448 for l in libstd libtest ; do
449 liblib=$RPM_BUILD_ROOT%{_libdir}/${l}-*.so
450 libstd=$RPM_BUILD_ROOT%{rustlibdir}/${rust_target}/lib/${l}-*.so
451 if [ "$(basename ${liblib})" = "$(basename ${libstd})" ]; then
452 ln -vfsr ${libstd} $RPM_BUILD_ROOT%{_libdir}/
453 fi
454 done
a973dc7e 455done
d1b96fd8
JR
456
457# Remove installer artifacts (manifests, uninstall scripts, etc.)
18a1004b 458find $RPM_BUILD_ROOT%{rustlibdir}/ -maxdepth 1 -type f -exec rm -v '{}' '+'
e361528e
ER
459
460# FIXME: __os_install_post will strip the rlibs
461# -- should we find a way to preserve debuginfo?
462
463# Remove unwanted documentation files (we already package them)
e8f16183
JB
464%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/README.md
465%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/COPYRIGHT
466%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/LICENSE-APACHE
467%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/LICENSE-MIT
e361528e
ER
468
469# Sanitize the HTML documentation
470find $RPM_BUILD_ROOT%{_docdir}/%{name}/html -empty -delete
471find $RPM_BUILD_ROOT%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+'
472
473# Move rust-gdb's python scripts so they're noarch
474install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
e8f16183 475%{__mv} $RPM_BUILD_ROOT%{rustlibdir}/etc $RPM_BUILD_ROOT%{_datadir}/%{name}
e361528e 476
4f353dba
JR
477# We don't need stdlib source
478%{__rm} -r $RPM_BUILD_ROOT%{rustlibdir}/src
479
1dd26160
JP
480# Create the path for crate-devel packages
481install -d $RPM_BUILD_ROOT%{_datadir}/cargo/registry
482
e361528e
ER
483%clean
484rm -rf $RPM_BUILD_ROOT
485
486%post -p /sbin/ldconfig
487%postun -p /sbin/ldconfig
488
489%files
490%defattr(644,root,root,755)
16ea23d8 491%doc COPYRIGHT LICENSE-APACHE LICENSE-MIT README.md
1736a047 492%attr(755,root,root) %{_bindir}/rust-demangler
e361528e
ER
493%attr(755,root,root) %{_bindir}/rustc
494%attr(755,root,root) %{_bindir}/rustdoc
6ed79af8 495%attr(755,root,root) %{_bindir}/rustfmt
a973dc7e 496%attr(755,root,root) %{_libdir}/librustc_driver-*.so
e8f16183 497%attr(755,root,root) %{_libdir}/libstd-*.so
e8f16183 498%attr(755,root,root) %{_libdir}/libtest-*.so
e361528e
ER
499%{_mandir}/man1/rustc.1*
500%{_mandir}/man1/rustdoc.1*
18a1004b 501%dir %{rustlibdir}
cd0c1484 502
cd0c1484
JR
503%files std
504%defattr(644,root,root,755)
62473c95
JP
505%(for rust_target in %rust_targets; do
506cat <<EOF
507%dir %{rustlibdir}/$rust_target
508%dir %{rustlibdir}/$rust_target/lib
509%attr(755,root,root) %{rustlibdir}/$rust_target/lib/*.so
510%{rustlibdir}/$rust_target/lib/*.rlib
511EOF
512done
513)
e361528e 514
f397d93b
JP
515%files analyzer
516%defattr(644,root,root,755)
517%attr(755,root,root) %{_bindir}/rust-analyzer
518%attr(755,root,root) %{_libexecdir}/rust-analyzer-proc-macro-srv
519
d1b96fd8
JR
520%files debugger-common
521%defattr(644,root,root,755)
522%dir %{_datadir}/%{name}
523%dir %{_datadir}/%{name}/etc
5aae056c
JP
524%{_datadir}/%{name}/etc/lldb_commands
525%{_datadir}/%{name}/etc/rust_types.py
d1b96fd8
JR
526
527%files lldb
528%defattr(644,root,root,755)
529%attr(755,root,root) %{_bindir}/rust-lldb
530%{_datadir}/%{name}/etc/lldb_*.py*
531
e361528e
ER
532%files gdb
533%defattr(644,root,root,755)
534%attr(755,root,root) %{_bindir}/rust-gdb
fe49e3fc 535%attr(755,root,root) %{_bindir}/rust-gdbgui
d1b96fd8 536%{_datadir}/%{name}/etc/gdb_*.py*
e361528e
ER
537
538%files doc
539%defattr(644,root,root,755)
540%dir %{_docdir}/%{name}
d1b96fd8 541%doc %{_docdir}/%{name}/html
8a758d34
JP
542
543%files -n cargo
544%defattr(644,root,root,755)
545%attr(755,root,root) %{_bindir}/cargo
6ed79af8
JB
546%attr(755,root,root) %{_bindir}/cargo-clippy
547%attr(755,root,root) %{_bindir}/cargo-fmt
548%attr(755,root,root) %{_bindir}/clippy-driver
8a54bb92 549%attr(755,root,root) %{_libexecdir}/cargo-credential-1password
8a758d34
JP
550%{_mandir}/man1/cargo*.1*
551%dir %{_datadir}/cargo
552%dir %{_datadir}/cargo/registry
553
554%files -n bash-completion-cargo
555%defattr(644,root,root,755)
556%{_sysconfdir}/bash_completion.d/cargo
557
558%files -n zsh-completion-cargo
559%defattr(644,root,root,755)
560%{zsh_compdir}/_cargo
This page took 0.697306 seconds and 4 git commands to generate.