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