%define stage1 1 Name: rustc Version: 1.52.1 Release: 1mamba Summary: The Rust programming language, designed to be a safe, concurrent, practical language Group: Applications/Development Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://www.rust-lang.org Source: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz Patch0: rustc-1.25.0-disable-llvm-ocaml-binding.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libcurl-devel BuildRequires: libgcc BuildRequires: libgit2-devel BuildRequires: libopenssl-devel BuildRequires: libstdc++6-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} %if "%{stage1}" != "1" BuildRequires: rustc %endif %description The Rust programming language, designed to be a safe, concurrent, practical language. %package -n lib%{name} Group: System/Libraries Summary: Shared libraries for %{name} %description -n lib%{name} This package contains shared libraries for %{name}. %package apidocs Group: Documentation Summary: Documentation for %{name} %description apidocs This package contains the documentation for %{name}. %debug_package %prep %setup -q -n %{name}-%{version}-src #-D -T #:<< _EOF #%patch0 -p0 cat < config.toml # see config.toml.example for more possible options [llvm] ninja = true %ifarch arm ldflags = "-latomic" %endif [build] %ifarch arm build = "arm-unknown-linux-gnueabi" host = ["arm-unknown-linux-gnueabi"] target= ["arm-unknown-linux-gnueabi"] %endif %if "%{stage1}" != "1" cargo = "/usr/bin/cargo" rustc = "/usr/bin/rustc" %endif python = "python2.7" extended = true sanitizers = false [install] prefix = "%{_prefix}" libdir = "%{_lib}" docdir = "share/doc/rust" [rust] # 0 or the new default of 16 is faster, but can result in worse performance # https://github.com/rust-lang/rust/issues/47745 codegen-units = 1 #debuginfo = true #debuginfo-lines = true channel = "stable" rpath = false EOF %build #:<< _EOF ./x.py build %{_smp_mflags} %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" DESTDIR=%{buildroot} ./x.py install %{_smp_mflags} chmod +x %{buildroot}%{_libdir}/lib*.so* cd %{buildroot}%{_libdir} #rm rustlib/{components,manifest-rustc,rust-installer-version} %ifarch %{ix86} ln -sf rustlib/i686-unknown-linux-gnu/lib/*.so . %else %ifarch arm ln -sf rustlib/arm-unknown-linux-gnueabi/lib/*.so . %else ln -sf rustlib/%{_arch}-unknown-linux-gnu/lib/*.so . %endif %endif cd - %find_lang %{name} || touch %{name}.lang %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig %files #-f %{name}.lang %defattr(-,root,root) %{_sysconfdir}/bash_completion.d/cargo %{_bindir}/cargo %{_bindir}/cargo-fmt %{_bindir}/cargo-clippy %{_bindir}/cargo-miri %{_bindir}/clippy-driver %{_bindir}/miri %{_bindir}/rls %{_bindir}/rust-analyzer %{_bindir}/rust-gdb %{_bindir}/rust-gdbgui %{_bindir}/rust-lldb %{_bindir}/rustc %{_bindir}/rustdoc %{_bindir}/rustfmt %{_mandir}/man1/cargo-*.1* %{_mandir}/man1/cargo.1* %{_mandir}/man1/rustc.1* %{_mandir}/man1/rustdoc.1* %{_datadir}/zsh/site-functions/_cargo %files -n lib%{name} %defattr(-,root,root) #%{_libdir}/libLLVM-11-rust-%{version}-stable.so* %{_libdir}/rustlib/src/rust/Cargo.lock #%{_libdir}/libchalk_derive-*.so #%{_libdir}/libserde_derive-*.so %{_libdir}/librustc*.so %{_libdir}/libstd-*.so %{_libdir}/libtest-*.so #%{_libdir}/libtracing_attributes-*.so %dir %{_libdir}/rustlib %{_libdir}/rustlib/components %{_libdir}/rustlib/rust-installer-version %dir %{_libdir}/rustlib/etc %{_libdir}/rustlib/etc/* %{_libdir}/rustlib/install.log %{_libdir}/rustlib/manifest-* %dir %{_libdir}/rustlib/src %dir %{_libdir}/rustlib/src/rust %dir %{_libdir}/rustlib/src/rust/library %{_libdir}/rustlib/src/rust/library/* %dir %{_libdir}/rustlib/src/rust/src/llvm-project %dir %{_libdir}/rustlib/src/rust/src/llvm-project/libunwind %{_libdir}/rustlib/src/rust/src/llvm-project/libunwind/.clang-format %{_libdir}/rustlib/src/rust/src/llvm-project/libunwind/* %{_libdir}/rustlib/uninstall.sh %ifarch %{ix86} %dir %{_libdir}/rustlib/i686-unknown-linux-gnu %{_libdir}/rustlib/i686-unknown-linux-gnu/* %else %ifarch arm %dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnueabi %{_libdir}/rustlib/%{_arch}-unknown-linux-gnueabi/* %else %dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnu %{_libdir}/rustlib/%{_arch}-unknown-linux-gnu/* %endif %endif %{_prefix}/libexec/cargo-credential-1password %files apidocs %defattr(-,root,root) %dir %{_datadir}/doc/rust %{_datadir}/doc/rust/COPYRIGHT %{_datadir}/doc/rust/LICENSE-* %{_datadir}/doc/rust/README.md %{_datadir}/doc/rust/README.md.old %{_datadir}/doc/rust/html/.lock %{_datadir}/doc/rust/html/.stamp %dir %{_datadir}/doc/rust/html %{_datadir}/doc/rust/html/* #%doc README.md %changelog * Tue May 11 2021 Automatic Build System 1.52.1-1mamba - automatic version update by autodist * Sat Mar 27 2021 Automatic Build System 1.51.0-1mamba - automatic version update by autodist * Sat Feb 27 2021 Automatic Build System 1.50.0-1mamba - automatic version update by autodist * Tue Nov 10 2020 Silvan Calarco 1.47.0-1mamba - update to 1.47.0 * Thu May 21 2020 Silvan Calarco 1.43.0-1mamba - update to 1.43.0 * Thu Jul 05 2018 Silvan Calarco 1.27.0-1mamba - update to 1.27.0 * Sat Jun 16 2018 Silvan Calarco 1.26.2-1mamba - update to 1.26.2 * Mon Apr 09 2018 Silvan Calarco 1.25.0-1mamba - package created using the webbuild interface