File rust-bzip2-sys.spec of Package rust-bzip2-sys

#
# spec file for package rust-bzip2-sys
#
# Copyright (c) 2024 u <u>.
#
# 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
%global debug_package %{nil}

%global crate bzip2-sys
%global upstream_version 0.1.11+1.0.8

Name:           rust-bzip2-sys
Version:        0.1.11
Release:        0
Summary:        Bindings to libbzip2 for bzip2 compression and decompression exposed as Reader/Writer streams
Group:          Development/Libraries/Rust

# Upstream license specification: MIT/Apache-2.0
License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/bzip2-sys
Source:         https://crates.io/api/v1/crates/%crate/%upstream_version/download#/%crate-%upstream_version.crate
# Automatically generated patch to strip dependencies and normalize metadata
Patch:          bzip2-sys-fix-metadata-auto.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21
BuildRequires:  (crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0~)
BuildRequires:  (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)
BuildRequires:  (crate(pkg-config/default) >= 0.3.9 with crate(pkg-config/default) < 0.4.0~)

%global _description %{expand:
Bindings to libbzip2 for bzip2 compression and decompression exposed as
Reader/Writer streams.}

%description %{_description}

%package        devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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-APACHE
%license %{crate_instdir}/LICENSE-MIT
%license %{crate_instdir}/bzip2-1.0.8/LICENSE
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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}+static-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+static-devel %{_description}

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

%files       -n %{name}+static-devel
%ghost %{crate_instdir}/Cargo.toml

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

%build
%cargo_build

%install
%cargo_install

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

%changelog
* Thu Apr 11 23:53:47 +03 2024 u <u>
- Version 0.1.11
- Initial package
openSUSE Build Service is sponsored by