171 lines
4.1 KiB
RPMSpec
171 lines
4.1 KiB
RPMSpec
|
%define stage1 1
|
||
|
Name: rustc
|
||
|
Version: 1.25.0
|
||
|
Release: 1mamba
|
||
|
Summary: The Rust programming language, designed to be a safe, concurrent, practical language
|
||
|
Group: Applications/Development
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
URL: https://www.rust-lang.org
|
||
|
Source: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz
|
||
|
Patch0: rustc-1.25.0-disable-llvm-ocaml-binding.patch
|
||
|
License: MIT
|
||
|
## AUTOBUILDREQ-BEGIN
|
||
|
BuildRequires: glibc-devel
|
||
|
BuildRequires: libcurl-devel
|
||
|
BuildRequires: libgcc
|
||
|
BuildRequires: libopenssl-devel
|
||
|
BuildRequires: libssh2-devel
|
||
|
BuildRequires: libstdc++6-devel
|
||
|
BuildRequires: libz-devel
|
||
|
## AUTOBUILDREQ-END
|
||
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||
|
%if "%{stage1}" != "1"
|
||
|
BuildRequires: rustc
|
||
|
%endif
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
The Rust programming language, designed to be a safe, concurrent, practical language.
|
||
|
|
||
|
%package -n lib%{name}
|
||
|
Group: System/Libraries
|
||
|
Summary: Shared libraries for %{name}
|
||
|
|
||
|
%description -n lib%{name}
|
||
|
This package contains shared libraries for %{name}.
|
||
|
|
||
|
%package apidocs
|
||
|
Group: Documentation
|
||
|
Summary: Documentation for %{name}
|
||
|
|
||
|
%description apidocs
|
||
|
This package contains the documentation for %{name}.
|
||
|
|
||
|
%debug_package
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n %{name}-%{version}-src
|
||
|
#-D -T
|
||
|
#:<< _EOF
|
||
|
%patch0 -p0
|
||
|
|
||
|
cat <<EOF > config.toml
|
||
|
# see config.toml.example for more possible options
|
||
|
[llvm]
|
||
|
ninja = true
|
||
|
|
||
|
[build]
|
||
|
%if "%{stage1}" != "1"
|
||
|
cargo = "/usr/bin/cargo"
|
||
|
rustc = "/usr/bin/rustc"
|
||
|
%endif
|
||
|
python = "python2.7"
|
||
|
extended = true
|
||
|
sanitizers = false
|
||
|
|
||
|
[install]
|
||
|
prefix = "%{_prefix}"
|
||
|
libdir = "%{_lib}"
|
||
|
docdir = "share/doc/rust"
|
||
|
|
||
|
[rust]
|
||
|
# 0 or the new default of 16 is faster, but can result in worse performance
|
||
|
# https://github.com/rust-lang/rust/issues/47745
|
||
|
codegen-units = 1
|
||
|
debuginfo = true
|
||
|
debuginfo-lines = true
|
||
|
channel = "stable"
|
||
|
rpath = false
|
||
|
EOF
|
||
|
|
||
|
%build
|
||
|
#:<< _EOF
|
||
|
./x.py build
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
DESTDIR=%{buildroot} ./x.py install
|
||
|
|
||
|
cd %{buildroot}%{_libdir}
|
||
|
rm rustlib/{components,manifest-rustc,rust-installer-version}
|
||
|
%ifarch %{ix86}
|
||
|
ln -sf rustlib/i686-unknown-linux-gnu/lib/*.so .
|
||
|
%else
|
||
|
ln -sf rustlib/%{_arch}-unknown-linux-gnu/lib/*.so .
|
||
|
%endif
|
||
|
cd -
|
||
|
|
||
|
%find_lang %{name} || touch %{name}.lang
|
||
|
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
%post -n lib%{name} -p /sbin/ldconfig
|
||
|
%postun -n lib%{name} -p /sbin/ldconfig
|
||
|
|
||
|
%files -f %{name}.lang
|
||
|
%defattr(-,root,root)
|
||
|
%{_sysconfdir}/bash_completion.d/cargo
|
||
|
%{_bindir}/cargo
|
||
|
%{_bindir}/cargo-fmt
|
||
|
%{_bindir}/rls
|
||
|
%{_bindir}/rust-gdb
|
||
|
%{_bindir}/rust-lldb
|
||
|
%{_bindir}/rustc
|
||
|
%{_bindir}/rustdoc
|
||
|
%{_bindir}/rustfmt
|
||
|
%{_mandir}/man1/cargo-*.1*
|
||
|
%{_mandir}/man1/cargo.1*
|
||
|
%{_mandir}/man1/rustc.1*
|
||
|
%{_mandir}/man1/rustdoc.1*
|
||
|
%{_datadir}/zsh/site-functions/_cargo
|
||
|
|
||
|
%files -n lib%{name}
|
||
|
%defattr(-,root,root)
|
||
|
%{_libdir}/libarena-*.so
|
||
|
%{_libdir}/libfmt_macros-*.so
|
||
|
%{_libdir}/libgraphviz-*.so
|
||
|
%{_libdir}/libproc_macro-*.so
|
||
|
%{_libdir}/librustc*.so
|
||
|
%{_libdir}/libserialize-*.so
|
||
|
%{_libdir}/libstd-*.so
|
||
|
%{_libdir}/libsyntax*.so
|
||
|
%{_libdir}/libterm-*.so
|
||
|
%{_libdir}/libtest-*.so
|
||
|
%dir %{_libdir}/rustlib
|
||
|
%dir %{_libdir}/rustlib/etc
|
||
|
%{_libdir}/rustlib/etc/*
|
||
|
%{_libdir}/rustlib/install.log
|
||
|
%{_libdir}/rustlib/manifest-*
|
||
|
%dir %{_libdir}/rustlib/src
|
||
|
%dir %{_libdir}/rustlib/src/rust
|
||
|
%dir %{_libdir}/rustlib/src/rust/src
|
||
|
%{_libdir}/rustlib/src/rust/src/*
|
||
|
%{_libdir}/rustlib/uninstall.sh
|
||
|
%ifarch %{ix86}
|
||
|
%dir %{_libdir}/rustlib/i686-unknown-linux-gnu
|
||
|
%{_libdir}/rustlib/i686-unknown-linux-gnu/*
|
||
|
%else
|
||
|
%dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnu
|
||
|
%{_libdir}/rustlib/%{_arch}-unknown-linux-gnu/*
|
||
|
%endif
|
||
|
|
||
|
%files apidocs
|
||
|
%defattr(-,root,root)
|
||
|
%dir %{_datadir}/doc/rust
|
||
|
%{_datadir}/doc/rust/COPYRIGHT
|
||
|
%{_datadir}/doc/rust/LICENSE-*
|
||
|
%{_datadir}/doc/rust/README.md
|
||
|
%{_datadir}/doc/rust/README.md.old
|
||
|
%{_datadir}/doc/rust/html/.lock
|
||
|
%{_datadir}/doc/rust/html/.stamp
|
||
|
%dir %{_datadir}/doc/rust/html
|
||
|
%{_datadir}/doc/rust/html/*
|
||
|
%doc README.md
|
||
|
|
||
|
%changelog
|
||
|
* Mon Apr 09 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.25.0-1mamba
|
||
|
- package created using the webbuild interface
|