rust/rust.spec
Andrey Bondrov 04822d8f83 New version 1.19.0
Merge runtime into main package
Use shared llvm
2017-08-10 10:04:44 +10:00

119 lines
3 KiB
RPMSpec

%define debug_package %{nil}
%define _disable_lto 1
%define _disable_ld_no_undefined 1
# To avoid undefined symbols
%define _find_debuginfo_opts -g
Summary: A safe, concurrent, practical programming language
Name: rust
Version: 1.19.0
Release: 1
License: MIT
Group: Development/Rust
Url: http://www.rust-lang.org/
Source0: http://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz
Source10: %{name}.rpmlintrc
BuildRequires: cmake
BuildRequires: bison
BuildRequires: curl
BuildRequires: docbook-style-xsl
BuildRequires: flex
BuildRequires: gdb
BuildRequires: git
BuildRequires: xsltproc
BuildRequires: llvm-devel
BuildRequires: pkgconfig(python)
%description
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
in syntactic and semantic details. Its design is oriented toward
concerns of "programming in the large", that is, of creating and
maintaining boundaries - both abstract and operational - that
preserve large-system integrity, availability and concurrency.
It supports a mixture of imperative procedural, concurrent actor,
object-oriented and pure functional styles. Rust also supports
generic programming and metaprogramming, in both static and dynamic
styles.
%files
%{_bindir}/rustc
%{_bindir}/rustdoc
%{_bindir}/rust-gdb
%{_bindir}/rust-lldb
%{_docdir}/%{name}/COPYRIGHT
%{_docdir}/%{name}/LICENSE-APACHE
%{_docdir}/%{name}/LICENSE-MIT
%{_docdir}/%{name}/README.md
%{_libdir}/lib*-*.so
%{_libdir}/rustlib/components
%{_libdir}/rustlib/etc/*.py
%{_libdir}/rustlib/*/lib/lib*-*.so
%{_libdir}/rustlib/*/lib/lib*-*.rlib
%{_mandir}/man*/*
#----------------------------------------------------------------------------
%package doc
Summary: Documentation for the Rust programming language
Group: Documentation
BuildArch: noarch
%description doc
This package contains the HTML documentation of the Rust programming language.
%files doc
%{_docdir}/%{name}/html/
#----------------------------------------------------------------------------
%prep
%setup -q -n rustc-%{version}-src
rm -rf src/llvm/
%build
./configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--libdir=%{_libdir} \
--localstatedir=%{_localstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--disable-rpath \
--default-linker=gcc \
--disable-codegen-tests \
--enable-llvm-link-shared \
--llvm-root=%{_prefix} \
--enable-vendor
./x.py build
./x.py doc
%install
DESTDIR=%{buildroot} ./x.py install --verbose
rm -f %{buildroot}%{_libdir}/rustlib/install.log
rm -f %{buildroot}%{_libdir}/rustlib/manifest-*
rm -f %{buildroot}%{_libdir}/rustlib/rust-installer-version
rm -f %{buildroot}%{_libdir}/rustlib/uninstall.sh
# Turn libraries into symlinks to avoid duplicate Provides
pushd %{buildroot}%{_libdir}/rustlib/*/lib/
rm lib*.so
for lib in ../../../*.so
do
ln -s $lib `basename $lib`
done
popd
# Manually strip them because auto-strip damages files
pushd %{buildroot}%{_libdir}
strip *.so
popd
pushd %{buildroot}%{_bindir}
strip rustc
strip rustdoc
popd