mirror of
https://abf.rosa.ru/djam/rust.git
synced 2025-02-23 18:02:53 +00:00
122 lines
3.4 KiB
RPMSpec
122 lines
3.4 KiB
RPMSpec
%define major 9026086f
|
|
%define runtime %mklibname rust-runtime %{major}
|
|
|
|
Summary: A safe, concurrent, practical programming language
|
|
Name: rust
|
|
Version: 1.9.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
|
|
# Fix the relative library path on x86-64.
|
|
Patch1: rustc-fix-rel-lib-v3.patch
|
|
BuildRequires: bison
|
|
BuildRequires: docbook-style-xsl
|
|
BuildRequires: flex
|
|
BuildRequires: xsltproc
|
|
BuildRequires: pkgconfig(python)
|
|
Requires: %{runtime} = %{EVRD}
|
|
|
|
%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
|
|
%{_docdir}/%{name}/COPYRIGHT
|
|
%{_docdir}/%{name}/LICENSE-APACHE
|
|
%{_docdir}/%{name}/LICENSE-MIT
|
|
%{_docdir}/%{name}/README.md
|
|
%{_libdir}/rustlib/components
|
|
%{_libdir}/rustlib/etc/*.py
|
|
%{_libdir}/rustlib/*/lib/libcompiler-rt.a
|
|
%{_libdir}/rustlib/*/lib/lib*-%{major}.rlib
|
|
%{_libdir}/rustlib/*/lib/lib*-%{major}.so
|
|
%{_mandir}/man*/*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{runtime}
|
|
Summary: Runtime libraries for Rust
|
|
Group: Development/Rust
|
|
|
|
%description -n %{runtime}
|
|
Runtime libraries for Rust.
|
|
|
|
%files -n %{runtime}
|
|
%{_libdir}/lib*-%{major}.so
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%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}
|
|
%patch1 -p1 -b .fix-rel-lib
|
|
|
|
%build
|
|
# enable better rust debug messages during build
|
|
export RUST_LOG=rustc=1;
|
|
|
|
# Unable to use standard configure as rust's configure is missing
|
|
# many of the options as commented out below from the configure2_5x macro
|
|
# build opt is available, but the mageia specific target platform is supported
|
|
./configure \
|
|
--prefix=%{_prefix} \
|
|
--sysconfdir=%{_sysconfdir} \
|
|
--datadir=%{_datadir} \
|
|
--libdir=%{_libdir} \
|
|
--localstatedir=%{_localstatedir} \
|
|
--mandir=%{_mandir} \
|
|
--infodir=%{_infodir}
|
|
# --build=%%{_target_platform} \
|
|
# --exec-prefix=%%{_exec_prefix} \
|
|
# --bindir=%%{_bindir} \
|
|
# --sbindir=%%{_sbindir} \
|
|
# --includedir=%%{_includedir} \
|
|
# --libexecdir=%%{_libexecdir} \
|
|
# --sharedstatedir=%%{_sharedstatedir} \
|
|
|
|
make
|
|
|
|
%install
|
|
%makeinstall_std
|
|
|
|
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
|
|
|