2024-01-05 17:35:27 +01:00
|
|
|
%define stage1 1
|
|
|
|
Name: rustc
|
2024-01-05 17:35:27 +01:00
|
|
|
Version: 1.52.1
|
2024-01-05 17:35:27 +01:00
|
|
|
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 <silvan.calarco@mambasoft.it>
|
|
|
|
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
|
2024-01-05 17:35:27 +01:00
|
|
|
BuildRequires: libcurl-devel
|
2024-01-05 17:35:27 +01:00
|
|
|
BuildRequires: libgcc
|
2024-01-05 17:35:27 +01:00
|
|
|
BuildRequires: libgit2-devel
|
2024-01-05 17:35:27 +01:00
|
|
|
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
|
2024-01-05 17:35:27 +01:00
|
|
|
%setup -q -n %{name}-%{version}-src
|
|
|
|
#-D -T
|
|
|
|
#:<< _EOF
|
2024-01-05 17:35:27 +01:00
|
|
|
#%patch0 -p0
|
2024-01-05 17:35:27 +01:00
|
|
|
|
|
|
|
cat <<EOF > config.toml
|
|
|
|
# see config.toml.example for more possible options
|
|
|
|
[llvm]
|
|
|
|
ninja = true
|
2024-01-05 17:35:27 +01:00
|
|
|
%ifarch arm
|
|
|
|
ldflags = "-latomic"
|
|
|
|
%endif
|
2024-01-05 17:35:27 +01:00
|
|
|
|
|
|
|
[build]
|
2024-01-05 17:35:27 +01:00
|
|
|
%ifarch arm
|
|
|
|
build = "arm-unknown-linux-gnueabi"
|
|
|
|
host = ["arm-unknown-linux-gnueabi"]
|
|
|
|
target= ["arm-unknown-linux-gnueabi"]
|
|
|
|
%endif
|
2024-01-05 17:35:27 +01:00
|
|
|
%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
|
2024-01-05 17:35:27 +01:00
|
|
|
#debuginfo = true
|
|
|
|
#debuginfo-lines = true
|
2024-01-05 17:35:27 +01:00
|
|
|
channel = "stable"
|
|
|
|
rpath = false
|
|
|
|
EOF
|
|
|
|
|
|
|
|
%build
|
2024-01-05 17:35:27 +01:00
|
|
|
#:<< _EOF
|
2024-01-05 17:35:27 +01:00
|
|
|
./x.py build %{_smp_mflags}
|
2024-01-05 17:35:27 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 17:35:27 +01:00
|
|
|
DESTDIR=%{buildroot} ./x.py install %{_smp_mflags}
|
2024-01-05 17:35:27 +01:00
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
chmod +x %{buildroot}%{_libdir}/lib*.so*
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
cd %{buildroot}%{_libdir}
|
2024-01-05 17:35:27 +01:00
|
|
|
#rm rustlib/{components,manifest-rustc,rust-installer-version}
|
2024-01-05 17:35:27 +01:00
|
|
|
%ifarch %{ix86}
|
|
|
|
ln -sf rustlib/i686-unknown-linux-gnu/lib/*.so .
|
|
|
|
%else
|
2024-01-05 17:35:27 +01:00
|
|
|
%ifarch arm
|
|
|
|
ln -sf rustlib/arm-unknown-linux-gnueabi/lib/*.so .
|
|
|
|
%else
|
2024-01-05 17:35:27 +01:00
|
|
|
ln -sf rustlib/%{_arch}-unknown-linux-gnu/lib/*.so .
|
|
|
|
%endif
|
2024-01-05 17:35:27 +01:00
|
|
|
%endif
|
2024-01-05 17:35:27 +01:00
|
|
|
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
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
%files
|
|
|
|
#-f %{name}.lang
|
2024-01-05 17:35:27 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sysconfdir}/bash_completion.d/cargo
|
|
|
|
%{_bindir}/cargo
|
|
|
|
%{_bindir}/cargo-fmt
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_bindir}/cargo-clippy
|
|
|
|
%{_bindir}/cargo-miri
|
|
|
|
%{_bindir}/clippy-driver
|
|
|
|
%{_bindir}/miri
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_bindir}/rls
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_bindir}/rust-analyzer
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_bindir}/rust-gdb
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_bindir}/rust-gdbgui
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_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)
|
2024-01-05 17:35:27 +01:00
|
|
|
#%{_libdir}/libLLVM-11-rust-%{version}-stable.so*
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_libdir}/rustlib/src/rust/Cargo.lock
|
2024-01-05 17:35:27 +01:00
|
|
|
#%{_libdir}/libchalk_derive-*.so
|
|
|
|
#%{_libdir}/libserde_derive-*.so
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_libdir}/librustc*.so
|
|
|
|
%{_libdir}/libstd-*.so
|
|
|
|
%{_libdir}/libtest-*.so
|
2024-01-05 17:35:27 +01:00
|
|
|
#%{_libdir}/libtracing_attributes-*.so
|
2024-01-05 17:35:27 +01:00
|
|
|
%dir %{_libdir}/rustlib
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_libdir}/rustlib/components
|
|
|
|
%{_libdir}/rustlib/rust-installer-version
|
2024-01-05 17:35:27 +01:00
|
|
|
%dir %{_libdir}/rustlib/etc
|
|
|
|
%{_libdir}/rustlib/etc/*
|
|
|
|
%{_libdir}/rustlib/install.log
|
|
|
|
%{_libdir}/rustlib/manifest-*
|
|
|
|
%dir %{_libdir}/rustlib/src
|
|
|
|
%dir %{_libdir}/rustlib/src/rust
|
2024-01-05 17:35:27 +01:00
|
|
|
%dir %{_libdir}/rustlib/src/rust/library
|
|
|
|
%{_libdir}/rustlib/src/rust/library/*
|
2024-01-05 17:35:27 +01:00
|
|
|
%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/*
|
2024-01-05 17:35:27 +01:00
|
|
|
%{_libdir}/rustlib/uninstall.sh
|
|
|
|
%ifarch %{ix86}
|
|
|
|
%dir %{_libdir}/rustlib/i686-unknown-linux-gnu
|
|
|
|
%{_libdir}/rustlib/i686-unknown-linux-gnu/*
|
|
|
|
%else
|
2024-01-05 17:35:27 +01:00
|
|
|
%ifarch arm
|
|
|
|
%dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnueabi
|
|
|
|
%{_libdir}/rustlib/%{_arch}-unknown-linux-gnueabi/*
|
|
|
|
%else
|
2024-01-05 17:35:27 +01:00
|
|
|
%dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnu
|
|
|
|
%{_libdir}/rustlib/%{_arch}-unknown-linux-gnu/*
|
|
|
|
%endif
|
2024-01-05 17:35:27 +01:00
|
|
|
%endif
|
|
|
|
%{_prefix}/libexec/cargo-credential-1password
|
2024-01-05 17:35:27 +01:00
|
|
|
|
|
|
|
%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/*
|
2024-01-05 17:35:27 +01:00
|
|
|
#%doc README.md
|
2024-01-05 17:35:27 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-01-05 17:35:27 +01:00
|
|
|
* Tue May 11 2021 Automatic Build System <autodist@mambasoft.it> 1.52.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Sat Mar 27 2021 Automatic Build System <autodist@mambasoft.it> 1.51.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Sat Feb 27 2021 Automatic Build System <autodist@mambasoft.it> 1.50.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Tue Nov 10 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.47.0-1mamba
|
|
|
|
- update to 1.47.0
|
|
|
|
|
|
|
|
* Thu May 21 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.43.0-1mamba
|
|
|
|
- update to 1.43.0
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Thu Jul 05 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27.0-1mamba
|
|
|
|
- update to 1.27.0
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Sat Jun 16 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.26.2-1mamba
|
|
|
|
- update to 1.26.2
|
|
|
|
|
2024-01-05 17:35:27 +01:00
|
|
|
* Mon Apr 09 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.25.0-1mamba
|
|
|
|
- package created using the webbuild interface
|