Last active
August 29, 2015 14:02
-
-
Save kikairoya/8de62160fda3f8066d6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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 <[email protected]> | |
- Initial build | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment