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