Accepting request 446549 from home:luke_nukem:branches:devel:languages:rust
OBS-URL: https://build.opensuse.org/request/show/446549 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=10
This commit is contained in:
committed by
Git OBS Bridge
parent
0cfbf98002
commit
ccecbe087b
91
rust.spec
91
rust.spec
@@ -16,13 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without bootstrap_tarball
|
||||
|
||||
%global rustc_version 1_11
|
||||
%global rustc_build_version 1_10
|
||||
%global rustc_version 1_13
|
||||
%global bootstrap 1.12.1
|
||||
|
||||
Name: rust
|
||||
Version: 1.11.0
|
||||
Version: 1.13.0
|
||||
Release: 0
|
||||
Summary: A systems programming language
|
||||
License: MIT or Apache-2.0
|
||||
@@ -30,6 +28,8 @@ Group: Development/Languages/Other
|
||||
Url: http://www.rust-lang.org
|
||||
ExclusiveArch: %ix86 x86_64 %arm aarch64
|
||||
# renamed to match upstream and other distros
|
||||
Obsoletes: rustc-1_10
|
||||
Obsoletes: rustc-1_11
|
||||
Obsoletes: rustc-1_9
|
||||
Provides: rustc = %{version}
|
||||
Provides: rustc-stable = %{version}
|
||||
@@ -37,22 +37,23 @@ Provides: rustc-stable = %{version}
|
||||
# some alternatives system should be implemented
|
||||
Conflicts: rustc < %{version}
|
||||
|
||||
BuildRequires: rustc-%{rustc_build_version}
|
||||
|
||||
Recommends: cargo
|
||||
|
||||
Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz
|
||||
Source1: rustc-%{bootstrap}-aarch64-unknown-linux-gnu.tar.gz
|
||||
Source2: rustc-%{bootstrap}-armv7-unknown-linux-gnueabihf.tar.gz
|
||||
Source3: rustc-%{bootstrap}-arm-unknown-linux-gnueabihf.tar.gz
|
||||
Source4: rustc-%{bootstrap}-x86_64-unknown-linux-gnu.tar.gz
|
||||
Source5: rustc-%{bootstrap}-i686-unknown-linux-gnu.tar.gz
|
||||
ExclusiveArch: armv7hl armv6hl aarch64 %ix86 x86_64
|
||||
|
||||
#use snap.sh to update following lines from "magic" constanst from src/snapshots.txt
|
||||
Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE: Disable embedding timestamp information
|
||||
Patch1: 0003-Disable-embedding-timestamp-information.patch
|
||||
# PATCH-FIX-OPENSUSE: Set DT_SONAME when building dylibs
|
||||
Patch2: add-soname.patch
|
||||
Patch1: add-soname.patch
|
||||
# PATCH-FIX-UPSTREAM build armv7 on armv7
|
||||
Patch3: 0001-Fix-armv7-autodetection.patch
|
||||
Patch2: 0001-Fix-armv7-autodetection.patch
|
||||
# PATCH-FIX-UPSTREAM build arm on armv6
|
||||
Patch4: 0002-Add-armv6l-autodetection.patch
|
||||
Patch3: 0002-Add-armv6l-autodetection.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@@ -99,41 +100,59 @@ Obsoletes: rust-1_10-gdb = %{version}
|
||||
Provides: rust-1_10-gdb <= %{version}
|
||||
Obsoletes: rustc-1_10-gdb = %{version}
|
||||
Provides: rustc-1_10-gdb <= %{version}
|
||||
Obsoletes: rust-1_11-gdb = %{version}
|
||||
Obsoletes: rustc-1_11-gdb = %{version}
|
||||
Supplements: packageand(%{name}:gdb)
|
||||
|
||||
%description gdb
|
||||
This subpackage provides pretty printers and a wrapper script for
|
||||
invoking gdb on rust binaries.
|
||||
|
||||
|
||||
%if %{with bootstrap_tarball}
|
||||
%package bootstrap-tarball
|
||||
Summary: Bootstrap tarball with rust binaries
|
||||
Group: Development/Languages/Other
|
||||
|
||||
%description bootstrap-tarball
|
||||
This subpackage provides tarball with rust binaries used for rust-bootstrap
|
||||
package.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n rustc-%{version}
|
||||
%setup -D -q -n rustc-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%ifarch aarch64
|
||||
tar -xvzf $RPM_SOURCE_DIR/rustc-%{bootstrap}-aarch64-unknown-linux-gnu.tar.gz
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
tar -xvzf $RPM_SOURCE_DIR/rustc-%{bootstrap}-armv7-unknown-linux-gnueabihf.tar.gz
|
||||
%endif
|
||||
%ifarch armv6hl
|
||||
tar -xvzf $RPM_SOURCE_DIR/rustc-%{bootstrap}-arm-unknown-linux-gnueabihf.tar.gz
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
tar -xvzf $RPM_SOURCE_DIR/rustc-%{bootstrap}-x86_64-unknown-linux-gnu.tar.gz
|
||||
%endif
|
||||
%ifarch %ix86
|
||||
tar -xvzf $RPM_SOURCE_DIR/rustc-%{bootstrap}-i686-unknown-linux-gnu.tar.gz
|
||||
%endif
|
||||
|
||||
%build
|
||||
pwd
|
||||
export CPPFLAGS="$RPM_OPT_FLAGS" # eliminate complain from RPMlint
|
||||
./configure \
|
||||
--enable-local-rust \
|
||||
--local-rust-root=%{_prefix} \
|
||||
%ifarch aarch64
|
||||
--local-rust-root=%{_builddir}/rustc-%{version}/rustc-%{bootstrap}-aarch64-unknown-linux-gnu/rustc/ \
|
||||
%endif
|
||||
%ifarch armv7hl
|
||||
--local-rust-root=%{_builddir}/rustc-%{version}/rustc-%{bootstrap}-armv7-unknown-linux-gnueabihf/rustc/ \
|
||||
%endif
|
||||
%ifarch armv6hl
|
||||
--local-rust-root=%{_builddir}/rustc-%{version}/rustc-%{bootstrap}-arm-unknown-linux-gnueabihf/rustc/ \
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
--local-rust-root=%{_builddir}/rustc-%{version}/rustc-%{bootstrap}-x86_64-unknown-linux-gnu/rustc/ \
|
||||
%endif
|
||||
%ifarch %ix86
|
||||
--local-rust-root=%{_builddir}/rustc-%{version}/rustc-%{bootstrap}-i686-unknown-linux-gnu/rustc/ \
|
||||
%endif
|
||||
--prefix=%{_prefix} \
|
||||
--release-channel=stable
|
||||
make %{?_smp_mflags}
|
||||
%if %{with bootstrap_tarball}
|
||||
make %{?_smp_mflags} dist-tar-bins
|
||||
%endif
|
||||
|
||||
%install
|
||||
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
||||
@@ -157,11 +176,6 @@ mv %{buildroot}%{_prefix}/share/doc/rust \
|
||||
%fdupes $RPM_BUILD_ROOT%{_prefix}
|
||||
%endif
|
||||
|
||||
%if %{with bootstrap_tarball}
|
||||
mkdir -p %{buildroot}%{_prefix}/share/rust-bootstrap-tarball
|
||||
mv dist/rustc-*.tar.gz %{buildroot}%{_prefix}/share/rust-bootstrap-tarball
|
||||
%endif
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
@@ -186,11 +200,4 @@ mv dist/rustc-*.tar.gz %{buildroot}%{_prefix}/share/rust-bootstrap-tarball
|
||||
%{_prefix}/lib/rustlib/etc/gdb_load_rust_pretty_printers.py
|
||||
%{_prefix}/lib/rustlib/etc/gdb_rust_pretty_printing.py
|
||||
|
||||
%if %{with bootstrap_tarball}
|
||||
%files bootstrap-tarball
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_prefix}/share/rust-bootstrap-tarball
|
||||
%{_prefix}/share/rust-bootstrap-tarball/rustc-*.tar.gz
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user