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.
104 lines
2.2 KiB
104 lines
2.2 KiB
# Generated by rust2rpm 21
|
|
%bcond_without check
|
|
|
|
%global crate btrd
|
|
|
|
%if 0%{?el8}
|
|
# el8 doesn't have these macros
|
|
%global __crates_url https://crates.io/api/v1/crates/
|
|
%global crates_source %{__crates_url}%{crate}/%{version}/download#/%{crate}-%{version}.crate
|
|
%global version_no_tilde %{version}
|
|
%endif
|
|
|
|
Name: rust-%{crate}
|
|
Version: 0.5.2
|
|
Release: %autorelease
|
|
Summary: Btrfs debugger
|
|
|
|
# Upstream license specification: GPL-2.0
|
|
License: GPLv2
|
|
URL: https://crates.io/crates/btrd
|
|
Source: %{crates_source}
|
|
# vendored dependencies for EPEL
|
|
# update with ./update-vendor-tarball.sh after bumping the specfile version
|
|
Source1: %{crate}-%{version}-vendor.tar.gz
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
|
|
%if 0%{?rhel}
|
|
BuildRequires: rust-toolset
|
|
%else
|
|
BuildRequires: rust-packaging >= 21
|
|
%endif
|
|
|
|
%global _description %{expand:
|
|
btrd is a REPL debugger that helps inspect mounted btrfs filesystems. btrd is
|
|
particularly useful in exploring on-disk structures and has full knowledge of
|
|
all on-disk types.}
|
|
|
|
%description %{_description}
|
|
|
|
%package -n %{crate}
|
|
Summary: %{summary}
|
|
|
|
%description -n %{crate} %{_description}
|
|
|
|
%files -n %{crate}
|
|
%license LICENSE
|
|
%doc scripts README.md
|
|
%{_bindir}/btrd
|
|
|
|
%if 0%{?fedora}
|
|
%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
|
|
%doc %{crate_instdir}/docs
|
|
%{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
|
|
%endif
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
|
%if 0%{?rhel}
|
|
%cargo_prep -V 1
|
|
%else
|
|
%cargo_prep
|
|
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
%endif
|
|
|
|
%build
|
|
%cargo_build
|
|
|
|
%install
|
|
%cargo_install
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
%autochangelog
|