Blob Blame History Raw
# Generated by rust2rpm 13
# * https://github.com/rhysd/cargo-husky/issues/17
%bcond_with check
%global debug_package %{nil}

%global crate cargo-husky

Name:           rust-%{crate}
Version:        1.5.0
Release:        2%{?dist}
Summary:        Husky for cargo

# Upstream license specification: MIT
License:        MIT
URL:            https://crates.io/crates/cargo-husky
Source:         %{crates_source}
# Initial patched metadata
# * Add license keyword, https://github.com/rhysd/cargo-husky/pull/15
Patch0:         cargo-husky-fix-metadata.diff

ExclusiveArch:  %{rust_arches}
%if %{__cargo_skip_build}
BuildArch:      noarch
%endif

BuildRequires:  rust-packaging

%global _description %{expand:
cargo-husky is a development tool to set Git hooks automatically on cargo test.
By hooking pre-push and running cargo test automatically, it prevents broken
codes from being pushed to a remote repository.}

%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.txt
%{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

%package     -n %{name}+postmerge-hook-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+postmerge-hook-devel %{_description}

This package contains library source intended for building other packages
which use "postmerge-hook" feature of "%{crate}" crate.

%files       -n %{name}+postmerge-hook-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+precommit-hook-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+precommit-hook-devel %{_description}

This package contains library source intended for building other packages
which use "precommit-hook" feature of "%{crate}" crate.

%files       -n %{name}+precommit-hook-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+prepush-hook-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+prepush-hook-devel %{_description}

This package contains library source intended for building other packages
which use "prepush-hook" feature of "%{crate}" crate.

%files       -n %{name}+prepush-hook-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+run-cargo-check-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+run-cargo-check-devel %{_description}

This package contains library source intended for building other packages
which use "run-cargo-check" feature of "%{crate}" crate.

%files       -n %{name}+run-cargo-check-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+run-cargo-clippy-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+run-cargo-clippy-devel %{_description}

This package contains library source intended for building other packages
which use "run-cargo-clippy" feature of "%{crate}" crate.

%files       -n %{name}+run-cargo-clippy-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+run-cargo-fmt-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+run-cargo-fmt-devel %{_description}

This package contains library source intended for building other packages
which use "run-cargo-fmt" feature of "%{crate}" crate.

%files       -n %{name}+run-cargo-fmt-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+run-cargo-test-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+run-cargo-test-devel %{_description}

This package contains library source intended for building other packages
which use "run-cargo-test" feature of "%{crate}" crate.

%files       -n %{name}+run-cargo-test-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+run-for-all-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+run-for-all-devel %{_description}

This package contains library source intended for building other packages
which use "run-for-all" feature of "%{crate}" crate.

%files       -n %{name}+run-for-all-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

%package     -n %{name}+user-hooks-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+user-hooks-devel %{_description}

This package contains library source intended for building other packages
which use "user-hooks" feature of "%{crate}" crate.

%files       -n %{name}+user-hooks-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
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Tue Jan 21 18:42:45 EET 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 1.5.0-1
- Update to 1.5.0

* Fri Nov 08 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.0-2
- Trivial fixes

* Thu Oct 31 15:06:16 EET 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.4.0-1
- Initial package