Accepting request 791945 from home:Andreas_Schwab:Factory
- Avoid duplication of environment settings OBS-URL: https://build.opensuse.org/request/show/791945 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=247
This commit is contained in:
parent
bb50254aff
commit
38d7bdb3c5
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 7 08:54:37 UTC 2020 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- Avoid duplication of environment settings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 12:28:18 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
|
37
rust.spec
37
rust.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package rust
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2019 Luke Jones, luke@ljones.dev
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -309,9 +309,9 @@ A tool for formatting Rust code according to style guidelines.
|
||||
|
||||
%package -n clippy
|
||||
Summary: Lints to catch common mistakes and improve Rust code
|
||||
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
|
||||
License: MPL-2.0
|
||||
Group: Development/Languages/Rust
|
||||
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
|
||||
Requires: %{name} = %{version}
|
||||
Requires: cargo = %{version}
|
||||
Provides: clippy = %{clippy_version}
|
||||
@ -335,10 +335,10 @@ Cargo downloads dependencies of Rust projects and compiles it.
|
||||
|
||||
%package -n cargo-doc
|
||||
Summary: Documentation for Cargo
|
||||
# Cargo no longer builds its own documentation
|
||||
# https://github.com/rust-lang/cargo/pull/4904
|
||||
License: MIT OR Apache-2.0
|
||||
Group: Development/Languages/Rust
|
||||
# Cargo no longer builds its own documentation
|
||||
# https://github.com/rust-lang/cargo/pull/4904
|
||||
Requires: rust-doc = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
@ -455,12 +455,12 @@ if [ $(%{rust_root}/bin/rustc --version | sed -En 's/rustc ([0-9].[0-9][0-9].[0-
|
||||
sed -i -e "s|#local-rebuild = false|local-rebuild = true|" config.toml;
|
||||
fi
|
||||
|
||||
# BEGIN EXPORTS
|
||||
# Create exports file
|
||||
# Keep all the "export VARIABLE" together here, so they can be
|
||||
# cut&pasted to the %%install section below. And please keep them
|
||||
# in sync!
|
||||
# reread in the %%install section below.
|
||||
# If the environments between build and install and different,
|
||||
# everything will be rebuilt during installation!
|
||||
cat > .env.sh <<\EOF
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500
|
||||
export CC=gcc-7
|
||||
@ -474,30 +474,15 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
export CPPFLAGS="%{optflags}"
|
||||
export DESTDIR=%{buildroot}
|
||||
# END EXPORTS
|
||||
EOF
|
||||
. ./.env.sh
|
||||
|
||||
./x.py build -v
|
||||
./x.py doc -v
|
||||
|
||||
%install
|
||||
# BEGIN EXPORTS
|
||||
# Keep all the "export VARIABLE" together here, so they can be
|
||||
# cut&pasted to the %%install section below. And please keep them
|
||||
# in sync!
|
||||
# If the environments between build and install and different,
|
||||
# everything will be rebuilt during installation!
|
||||
export RUSTFLAGS="%{rustflags}"
|
||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500
|
||||
export CC=gcc-7
|
||||
export CXX=g++-7
|
||||
%endif
|
||||
# Make cargo use system libs if not bootstrapping
|
||||
%if !%{with rust_bootstrap} && 0%{?sle_version} >= 150000
|
||||
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
%endif
|
||||
# eliminate complain from RPMlint
|
||||
export CPPFLAGS="%{optflags}"
|
||||
export DESTDIR=%{buildroot}
|
||||
# END EXPORTS
|
||||
# Reread exports file
|
||||
. ./.env.sh
|
||||
|
||||
./x.py install
|
||||
./x.py install src
|
||||
|
Loading…
x
Reference in New Issue
Block a user