From bf3818f75d647547db135250140addc727829e128d1554aa2b4ac02dbadd7316 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Mon, 31 Oct 2016 19:32:47 +0000 Subject: [PATCH] Accepting request 438072 from home:matwey:branches:devel:languages:rust OBS-URL: https://build.opensuse.org/request/show/438072 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=8 --- rust.spec | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 273b5e6..575b3f3 100644 --- a/rust.spec +++ b/rust.spec @@ -16,6 +16,8 @@ # +%bcond_without bootstrap_tarball + %global rustc_version 1_11 %global rustc_build_version 1_10 @@ -26,7 +28,7 @@ Summary: A systems programming language License: MIT or Apache-2.0 Group: Development/Languages/Other Url: http://www.rust-lang.org -ExclusiveArch: %ix86 x86_64 +ExclusiveArch: %ix86 x86_64 %arm aarch64 # renamed to match upstream and other distros Obsoletes: rustc-1_9 Provides: rustc = %{version} @@ -99,6 +101,17 @@ Supplements: packageand(%{name}: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} %patch1 -p1 @@ -109,8 +122,12 @@ export CPPFLAGS="$RPM_OPT_FLAGS" # eliminate complain from RPMlint ./configure \ --enable-local-rust \ --local-rust-root=%{_prefix} \ - --prefix=%{_prefix} + --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 @@ -134,6 +151,11 @@ 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 @@ -158,4 +180,11 @@ mv %{buildroot}%{_prefix}/share/doc/rust \ %{_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