Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
%define gccver 4.8.2
Summary: rust for wandbox
Name: wandbox-rust-head
Version: %(eval date +%Y%m%d)
Release: 1
License: Apache
Group: wandbox
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: wandbox-gcc-%{gccver} wandbox-libuv
BuildRequires: libffi-dev
URL: http://melpon.org/wandbox
%define _prefix /opt/wandbox/rust-head
%define gccdir /opt/wandbox/gcc-%{gccver}
%define libuvdir /opt/wandbox/libuv/lib64
%description
a component of wandbox service
%prep
%setup -q -c -T
git clone https://github.com/mozilla/rust.git --depth 1 .
%build
PATH="%{gccdir}/bin:$PATH"
export CC="%{gccdir}/bin/gcc"
export CXX="%{gccdir}/bin/g++"
export LDFLAGS="-Wl,-rpath,%{gccdir}/lib64"
export RUSTFLAGS="-C linker=%{gccdir}/bin/g++ -C link-args=-Wl,-rpath,%{gccdir}/lib64"
%{_configure} --prefix=%{_prefix} --sysconfdir=%{_prefix}/etc --disable-docs --disable-llvm-assertions --disable-debug --enable-llvm-static-stdcpp --libuv-root=%{libuvdir}
%{__make} RUSTFLAGS="$RUSTFLAGS" %{_smp_mflags} -k
%{__make} RUSTFLAGS="$RUSTFLAGS" %{_smp_mflags} -k
%{__make} RUSTFLAGS="$RUSTFLAGS"
%install
%{make_install}
rm -rf %{buildroot}%{_prefix}/share
%clean
rm -rf %{buildroot}
%files
%defattr(755,root,root,755)
%{_prefix}/bin
%{_prefix}/lib
%changelog
* Fri Jun 20 2014 kikairoya <kikairoya@gmail.com>
- Initial build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.