Accepting request 481900 from home:luke_nukem:branches:devel:languages:rust
OBS-URL: https://build.opensuse.org/request/show/481900 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=82
This commit is contained in:
committed by
Git OBS Bridge
parent
b38e308e7b
commit
2c12758fc1
68
rust.spec
68
rust.spec
@@ -17,7 +17,8 @@
|
||||
#
|
||||
|
||||
|
||||
%global prev_version 1.15.0
|
||||
%global prev_rust 1.15.1
|
||||
%global prev_cargo 0.16.0
|
||||
%global abi gnu
|
||||
%ifarch s390x
|
||||
%global _arch s390x
|
||||
@@ -39,7 +40,7 @@
|
||||
%global _arch i586
|
||||
%endif
|
||||
%global rust_triple %{_arch}-unknown-linux-%{abi}
|
||||
%bcond_with bootstrap
|
||||
%bcond_with rust_bootstrap
|
||||
Name: rust
|
||||
Version: 1.16.0
|
||||
Release: 0
|
||||
@@ -52,10 +53,13 @@ Source1: config.toml
|
||||
Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE: Set DT_SONAME when building dylibs
|
||||
Patch1: add-soname.patch
|
||||
BuildRequires: ccache
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: cmake
|
||||
BuildRequires: curl
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: procps
|
||||
BuildRequires: python
|
||||
Recommends: cargo
|
||||
@@ -75,12 +79,15 @@ BuildRequires: fdupes
|
||||
|
||||
# There are no successful builds for less than TW or Leap 42.2, so bootstrap
|
||||
# until such time that there is.
|
||||
%if %{with bootstrap} || (0%{?suse_version} < 1330 && 0%{?sle_version} <= 120100)
|
||||
BuildRequires: cargo-bootstrap
|
||||
BuildRequires: rustc-bootstrap >= %{prev_version}
|
||||
%if %{with rust_bootstrap} || (0%{?suse_version} < 1330 && 0%{?sle_version} <= 120100)
|
||||
BuildRequires: cargo-bootstrap >= %{prev_cargo}
|
||||
BuildRequires: rust-std-bootstrap == %{prev_rust}
|
||||
BuildRequires: rustc-bootstrap == %{prev_rust}
|
||||
%else
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust >= %{prev_version}
|
||||
# Require exact versions to help prevent OBS build loops
|
||||
BuildRequires: cargo == %{prev_cargo}
|
||||
BuildRequires: rust == %{prev_rust}
|
||||
BuildRequires: rust-std == %{prev_rust}
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -129,24 +136,19 @@ invoking gdb on rust binaries.
|
||||
|
||||
%build
|
||||
export CPPFLAGS="%{optflags}" # eliminate complain from RPMlint
|
||||
%configure --disable-option-checking \
|
||||
--build=%{rust_triple} \
|
||||
--host=%{rust_triple} \
|
||||
--target=%{rust_triple} \
|
||||
--enable-local-rust \
|
||||
--local-rust-root=%{_prefix} \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_prefix}/lib \
|
||||
--docdir=%{_docdir}/%{name} \
|
||||
--disable-rpath \
|
||||
--disable-codegen-tests \
|
||||
--disable-rustbuild \
|
||||
--enable-vendor \
|
||||
--release-channel=stable
|
||||
make %{?_smp_mflags}
|
||||
sed -e 's:<rust-triple>:%{rust_triple}:g' \
|
||||
-e 's:<prefix>:%{buildroot}%{_prefix}:g' \
|
||||
-e 's:<libdir>:%{buildroot}%{_prefix}/lib:g' \
|
||||
-e 's:<mandir>:%{buildroot}%{_mandir}:g' \
|
||||
-e 's:<docdir>:%{buildroot}%{_docdir}/%{name}:g' \
|
||||
%{SOURCE1} > config.toml
|
||||
./x.py build -v
|
||||
./x.py doc -v
|
||||
|
||||
%install
|
||||
%make_install
|
||||
./x.py dist --install
|
||||
# Fix any rpaths if needed
|
||||
chrpath -d %{buildroot}%{_prefix}/lib/lib*.so
|
||||
|
||||
# Remove executable permission from HTML documentation
|
||||
# to prevent RPMLINT errors.
|
||||
@@ -187,6 +189,7 @@ rm %{buildroot}%{_defaultdocdir}/%{name}/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT}
|
||||
%doc README.md
|
||||
%{_bindir}/rustc
|
||||
%{_bindir}/rustdoc
|
||||
%{_bindir}/rust-lldb
|
||||
%{_mandir}/man1/rustc.1*
|
||||
%{_mandir}/man1/rustdoc.1*
|
||||
%{_prefix}/lib/lib*.so
|
||||
@@ -208,6 +211,7 @@ rm %{buildroot}%{_defaultdocdir}/%{name}/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT}
|
||||
%{_prefix}/lib/rustlib/etc/debugger_pretty_printers_common.py
|
||||
%{_prefix}/lib/rustlib/etc/gdb_load_rust_pretty_printers.py
|
||||
%{_prefix}/lib/rustlib/etc/gdb_rust_pretty_printing.py
|
||||
%{_prefix}/lib/rustlib/etc/lldb_rust_formatters.py
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
@@ -219,22 +223,6 @@ rm %{buildroot}%{_defaultdocdir}/%{name}/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT}
|
||||
%license %{_docdir}/%{name}/html/SourceSerifPro-LICENSE.txt
|
||||
%dir %{_docdir}/%{name}
|
||||
%dir %{_docdir}/%{name}/html
|
||||
%doc %{_docdir}/%{name}/html/alloc
|
||||
%doc %{_docdir}/%{name}/html/book
|
||||
%doc %{_docdir}/%{name}/html/collections
|
||||
%doc %{_docdir}/%{name}/html/core
|
||||
%doc %{_docdir}/%{name}/html/extra
|
||||
%doc %{_docdir}/%{name}/html/implementors
|
||||
%doc %{_docdir}/%{name}/html/libc
|
||||
%doc %{_docdir}/%{name}/html/nomicon
|
||||
%doc %{_docdir}/%{name}/html/src
|
||||
%doc %{_docdir}/%{name}/html/std
|
||||
%doc %{_docdir}/%{name}/html/std_unicode
|
||||
%doc %{_docdir}/%{name}/html/COPYRIGHT.txt
|
||||
%doc %{_docdir}/%{name}/html/*.html
|
||||
%doc %{_docdir}/%{name}/html/*.inc
|
||||
%doc %{_docdir}/%{name}/html/*.woff
|
||||
%doc %{_docdir}/%{name}/html/*.js
|
||||
%doc %{_docdir}/%{name}/html/*.css
|
||||
%doc %{_docdir}/%{name}/html/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user