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-pico-args/rust-pico-args.spec

81 lines
1.8 KiB

# Generated by rust2rpm 13
%bcond_without check
%global debug_package %{nil}
%global crate pico-args
Name: rust-%{crate}
Version: 0.3.1
Release: 1%{?dist}
Summary: Ultra simple CLI arguments parser
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/pico-args
Source: %{crates_source}
# Some tests don't work in --release mode
# https://github.com/RazrFalcon/pico-args/issues/9
# https://github.com/RazrFalcon/pico-args/commit/73eb2098180c460e24eeb575efc545bdc8efcf84
Patch0001: 0001-Ignore-debug-related-tests-in-release-mode.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Ultra simple CLI arguments parser.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE
%doc README.md CHANGELOG.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Wed Feb 19 16:28:49 PST 2020 Josh Stone <jistone@redhat.com> - 0.3.1-1
- Initial package