File adler32.spec of Package rust-adler32

#
# spec file for package adler32
#
# Copyright (c) 2024 Your Name <you@example.com>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

# Generated by rust2rpm 26
%bcond_without check

# prevent library files from being installed
%global cargo_install_lib 0

Name:           adler32
Version:        1.2.0
Release:        0
Summary:        Minimal Adler32 implementation for Rust
Group:          Development/Libraries/Rust

SourceLicense:  Zlib
# FIXME: paste output of %%cargo_license_summary here
License:        # FIXME
# LICENSE.dependencies contains a full license breakdown

URL:            https://github.com/remram44/adler32-rs
Source:         # FIXME

ExclusiveArch:  %{rust_arches}

BuildRequires:  cargo-rpm-macros >= 26
%if %{with check}
BuildRequires:  (crate(criterion/default) >= 0.3.0 with crate(criterion/default) < 0.4.0~)
BuildRequires:  (crate(getrandom/default) >= 0.1.0 with crate(getrandom/default) < 0.2.0~)
BuildRequires:  (crate(getrandom/wasm-bindgen) >= 0.1.0 with crate(getrandom/wasm-bindgen) < 0.2.0~)
BuildRequires:  (crate(humansize/default) >= 1.1.0 with crate(humansize/default) < 2.0.0~)
BuildRequires:  (crate(rand/default) >= 0.7.0 with crate(rand/default) < 0.8.0~)
%endif

%global _description %{expand:
Minimal Adler32 implementation for Rust.}

%description %{_description}

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%files
%license LICENSE
%license LICENSE.dependencies
%doc README.md

%changelog
* Tue Apr 23 15:42:17 EAT 2024 Your Name <you@example.com>
- Version 1.2.0
- Initial package
openSUSE Build Service is sponsored by