Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:illuusio:buildbot-worker
rust
rust.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rust.spec of Package rust
# # spec file for package rust # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define rustc_version 1.62.1 %define rustc_arch x86_64-unknown-linux-gnu %define rustc_package rust-%{rustc_version}-%{rustc_arch} %define rustlibdir %{_prefix}/lib/rustlib %define rustlibdir_arch %{rustlibdir}/%{rustc_arch} Name: rust Version: %{rustc_version} Release: 0 Summary: The Rust Programming Language License: (Apache-2.0 OR MIT) AND (BSD AND MIT) # ^ written as: (rust itself) and (bundled libraries) URL: https://www.rust-lang.org Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz BuildRequires: chrpath # The C compiler is needed at runtime just for linking. Someday rustc might # invoke the linker directly, and then we'll only need binutils. # https://github.com/rust-lang/rust/issues/11937 Requires: %{_bindir}/cc # Always require our exact standard library Requires: %{name}-std-static%{?_isa} = %{version}-%{release} Requires: rust-libs # Virtual provides for folks who attempt "dnf install rustc" Provides: rustc = %{version}-%{release} Provides: rustc%{?_isa} = %{version}-%{release} %description Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. This package includes the Rust compiler and documentation generator. %package std-static Summary: Standard library for Rust %description std-static This package includes the standard libraries for building applications written in Rust. %package -n cargo Summary: Rust's package manager and build tool # For tests: BuildRequires: git # Cargo is not much use without Rust Requires: rust # "cargo vendor" is a builtin command starting with 1.37. The Obsoletes and # Provides are mostly relevant to RHEL, but harmless to have on Fedora/etc. too Obsoletes: cargo-vendor <= 0.1.23 Requires: python3-importlib-metadata Requires: python3-jinja2 Requires: python3-requests Provides: cargo-vendor = %{version}-%{release} %if %with bundled_libgit2 Provides: bundled(libgit2) = 1.1.0 %endif %description -n cargo Cargo is a tool that allows Rust projects to declare their various dependencies and ensure that you'll always get a repeatable build. %package libs Summary: Rust's libs Provides: libLLVM-14-rust-1.62.1-stable.so()(64bit) Provides: libLLVM-14-rust-1.62.1-stable.so(LLVM_14)(64bit) Provides: librustc_driver-1bde28880ea8bde8.so()(64bit) Provides: libstd-69edc9ac8de4d39c.so()(64bit) %description libs Some libs that are needed but rust %prep %setup -q -n %{rustc_package} %build ./install.sh --destdir=%{buildroot} --prefix=%{_prefix} # Remove docs ... Never good idea rm -rf %{buildroot}%{_datadir} rm -rf %{buildroot}%{_sysconfdir} # These are not needed to compilation rm -rf %{buildroot}%{_bindir}/rustfmt rm -rf %{buildroot}%{_bindir}/rust-* rm -rf %{buildroot}%{_bindir}/rustdoc rm -rf %{buildroot}%{_bindir}/cargo-clippy rm -rf %{buildroot}%{_bindir}/cargo-fmt rm -rf %{buildroot}%{_bindir}/rls rm -rf %{buildroot}%{_bindir}/clippy-driver rm -rf %{buildroot}%{rustlibdir_arch}/analysis rm -rf %{buildroot}%{rustlibdir_arch}/lib/*.a rm -rf %{buildroot}%{rustlibdir_arch}/lib/*.so rm -rf %{buildroot}%{rustlibdir_arch}/bin/opt rm -rf %{buildroot}%{rustlibdir}/*.sh rm -rf %{buildroot}%{rustlibdir}/*.log rm -rf %{buildroot}%{_prefix}%{_sysconfdir} mkdir -p %{buildroot}%{_libdir} mv %{buildroot}%{_prefix}/lib/*.so %{buildroot}%{_libdir} chrpath -d %{buildroot}%{_bindir}/* chrpath -d %{buildroot}%{_libdir}/*.so chrpath -d %{buildroot}%{rustlibdir_arch}/bin/llc chrpath -d %{buildroot}%{rustlibdir_arch}/bin/llvm* chrpath -d %{buildroot}%{rustlibdir_arch}/bin/gcc-ld/* chrpath -d %{buildroot}%{rustlibdir_arch}/bin/rust-lld # Check installed files find %{buildroot} %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT %doc README.md %{_bindir}/rustc # They have rpath set so this is needed %dir %{rustlibdir} %dir %{rustlibdir_arch} %dir %{rustlibdir_arch}/bin %dir %{rustlibdir_arch}/bin/gcc-ld %dir %{rustlibdir}%{_sysconfdir} %{rustlibdir}%{_sysconfdir}/* %{rustlibdir}/manifest-* %{rustlibdir}/rust-installer-version %{rustlibdir}/components %{rustlibdir_arch}/bin/llvm* %{rustlibdir_arch}/bin/llc %{rustlibdir_arch}/bin/rust-lld %{rustlibdir_arch}/bin/gcc-ld/* %files std-static %dir %{rustlibdir} %dir %{rustlibdir_arch} %dir %{rustlibdir_arch}/lib %{rustlibdir_arch}/lib/*.rlib %files -n cargo %{_bindir}/cargo %{_libexecdir}/cargo* %files libs %{_libdir}/* %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