You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-alloc-stdlib/rust-alloc-stdlib.spec

89 lines
2.2 KiB

# Generated by rust2rpm 24
%bcond_without check
%global debug_package %{nil}
%global crate alloc-stdlib
Name: rust-alloc-stdlib
Version: 0.2.2
Release: %autorelease
Summary: Dynamic allocator example that may be used with the stdlib
# https://github.com/dropbox/rust-alloc-no-stdlib/issues/9
License: BSD-3-Clause
URL: https://crates.io/crates/alloc-stdlib
Source0: %{crates_source}
Source1: https://github.com/dropbox/rust-alloc-no-stdlib/raw/3b341cc/LICENSE
# Manually created patch for downstream crate metadata changes
# * prevent example executable from being installed and shipped
Patch: alloc-stdlib-fix-metadata.diff
BuildRequires: rust-packaging >= 21
%global _description %{expand:
A dynamic allocator example that may be used with the stdlib.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+unsafe-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+unsafe-devel %{_description}
This package contains library source intended for building other packages which
use the "unsafe" feature of the "%{crate}" crate.
%files -n %{name}+unsafe-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# https://github.com/dropbox/rust-alloc-no-stdlib/pull/8
find -type f -name '*.rs' -executable -exec chmod -x '{}' +
%cargo_prep
cp -pav %{SOURCE1} .
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog