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