Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aevseev:devel
rustc
rustc.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rustc.spec of Package rustc
%define realname rustc %define realver 1.75.0 %define srcext tar.xz # Use downloaded Rust snapshot or previously built version from repository %bcond_without stage0 # See src/stage0.json %define stage0_date 2023-11-16 %define stage0_version 1.74.0 %define stage0_cargo_ver %{stage0_version} # turn off the generation of debuginfo rpm (RH9) ?? %global debug_package %{nil} %define verminor %(awk -F. '{printf "%d.%d", $1, $2}' <<< %realver) # Common info Name: rust Version: %{realver} Release: %{?extraver:0.}1%{?dist} License: Apache-2.0 and MIT Group: Programming/Languages/Rust URL: http://www.rust-lang.org/ Summary: Compiler for the Rust Programming Language # Install-time parameters Requires: %{name}-libstd = %{version}-%{release} Provides: rust%{verminor} = %{version}-%{release} Provides: rust-toolset = %{version}-%{release} Provides: rustc = %{version}-%{release} Provides: rust+rustc = %{version}-%{release} Provides: rust-src = %{version}-%{release} Provides: librust = %{version}-%{release} Provides: rust-libs = %{version}-%{release} Provides: rust-std-static = %{version}-%{release} Provides: cargo = %{version}-%{release} Obsoletes: rustc < %{version}-%{release} Obsoletes: cargo < %{version}-%{release} # Build-time parameters BuildRequires: gcc-c++ BuildRequires: python3 BuildRequires: ninja BuildRequires: pkg-config BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libssh2) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(libgit2) %if %{without stage0} BuildRequires: %{name} %endif BuildRequires: llvm-devel # Next requirements needed for llvm-devel BuildRequires: ncurses-devel zlib-devel %if 0%{?suse_version} BuildRequires: fdupes %endif Source0: https://static.rust-lang.org/dist/%{realname}-%{realver}%{?extraver}-src.%{srcext} %if %{with stage0} Source11: https://static.rust-lang.org/dist/%{stage0_date}/rust-std-%{stage0_version}-x86_64-unknown-linux-gnu.tar.xz Source12: https://static.rust-lang.org/dist/%{stage0_date}/rustc-%{stage0_version}-x86_64-unknown-linux-gnu.tar.xz Source21: https://static.rust-lang.org/dist/%{stage0_date}/cargo-%{stage0_cargo_ver}-x86_64-unknown-linux-gnu.tar.xz %endif %description Rust is a fast systems programming language that guarantees memory safety and offers painless concurrency (no data races). It does not employ a garbage collector and has minimal runtime overhead. This package contains the compiler (rustc), as well as standard libraries and tools for Rust. %package libstd Group: System/Libraries Summary: Rust Programming Language standard library Provides: rust-std = %{version}-%{release} %description libstd Rust is a fast systems programming language that guarantees memory safety and offers painless concurrency (no data races). It does not employ a garbage collector and has minimal runtime overhead. This package contains the standard library. %package doc Group: Documentation/HTML Summary: Documentation for the Rust Programming Language Compiler BuildArch: noarch %description doc Rust is a fast systems programming language that guarantees memory safety and offers painless concurrency (no data races). It does not employ a garbage collector and has minimal runtime overhead. This package contains documentation for Rust. # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{realname}-%{realver}%{?extraver}-src %{__rm} -rf src/llvm %{__install} -d -m755 build/cache/%{stage0_date} mv .cargo build/ %if %{with stage0} %{__install} -m644 %{S:11} build/cache/%{stage0_date} %{__install} -m644 %{S:12} build/cache/%{stage0_date} %{__install} -m644 %{S:21} build/cache/%{stage0_date} %endif %build export CARGO_HOME=$(pwd -P)/.cargo-cache export CARGO_NET_OFFLINE=true export RUSTFLAGS_NOT_BOOTSTRAP='-C opt-level=2 -C target-cpu=skylake -C strip=symbols' ./configure \ %if %{without stage0} --enable-local-rust \ %endif --enable-llvm-link-shared \ --enable-ninja \ --enable-vendor \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --llvm-root=%{_prefix} \ --release-channel=stable %{__ln_s} build/.cargo python3 ./x.py build -v %{?_smp_mflags} %install export RUSTFLAGS_NOT_BOOTSTRAP='-C opt-level=2 -C target-cpu=skylake -C strip=symbols' DESTDIR=%{buildroot} python3 ./x.py install -v # Shebangs %{__sed} -ri '1i\#!/bin/bash' \ %{buildroot}%{_libdir}/rustlib/src/rust/library/backtrace/ci/{android-ndk.sh,debuglink-docker.sh,run-docker.sh} %{__sed} -ri '1s|^.+$|#!/bin/bash|' \ %{buildroot}%{_libdir}/rustlib/src/rust/library/backtrace/ci/android-sdk.sh \ %{buildroot}%{_libdir}/rustlib/src/rust/library/stdarch/ci/{build-std-detect.sh,dox.sh,run-docker.sh,run.sh,style.sh} %{__sed} -ri '1s|^.+$|#!/usr/bin/python3|' \ %{buildroot}%{_libdir}/rustlib/src/rust/library/core/src/unicode/printable.py # bash completion %{__install} -d -m0755 %{buildroot}%{_datadir}/bash-completion/completions %{__mv} %{buildroot}%{_sysconfdir}/bash_completion.d/cargo %{buildroot}%{_datadir}/bash-completion/completions/ # Docs %{__install} -d -m0755 %{buildroot}%{_datadir}/HTML/en/rust %{__mv} %{buildroot}%{_datadir}/doc/rust/html/* %{buildroot}%{_datadir}/HTML/en/rust/ %{__rm} -rf %{buildroot}%{_datadir}/doc # Uninstaller %{__rm} -rf %{buildroot}%{_libdir}/rustlib/{components,install.log,rust-installer-version,uninstall.sh} %{buildroot}%{_libdir}/rustlib/manifest-* # Hidden files find %{buildroot}%{_prefix} -name .\* -type f -delete # Executable bit on .so libs find %{buildroot}%{_libdir} -name \*.so -type f -exec %{__chmod} -c a+x {} \; # File duplicates %if 0%{?suse_version} %fdupes %{buildroot}%{_prefix} %endif %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-,root,root) %license LICENSE-* COPYRIGHT %doc README.md RELEASES.md %{_bindir}/* %{_libdir}/*.so %{_libdir}/rustlib/ %if 0%{?suse_version} %dir %{_prefix}/libexec %endif %{_prefix}/libexec/rust-analyzer-proc-macro-srv %dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion %{_datadir}/bash-completion/completions/cargo %dir %{_datadir}/zsh/site-functions %dir %{_datadir}/zsh %{_datadir}/zsh/site-functions/_cargo %doc %{_mandir}/man1/* %exclude %{_bindir}/*.old %exclude %{_libdir}/libstd-*.so %exclude %{_libdir}/rustlib/%{_arch}-*-%{_os}%{?_gnu}/lib/libstd-*.so %files doc %defattr(-,root,root) %dir %{_datadir}/HTML/en %dir %{_datadir}/HTML %{_datadir}/HTML/en/rust/ %files libstd %defattr(-,root,root) %license LICENSE-* COPYRIGHT %{_libdir}/libstd-*.so %{_libdir}/rustlib/%{_arch}-*-%{_os}%{?_gnu}/lib/libstd-*.so %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor