## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}

%global crate sqlx-mysql

Name:           rust-sqlx-mysql
Version:        0.8.2
Release:        %autorelease
Summary:        MySQL driver implementation for SQLx

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/sqlx-mysql
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24
BuildRequires:  tomcli

%global _description %{expand:
MySQL driver implementation for SQLx. Not for direct use; see the `sqlx`
crate for details.}

%description %{_description}

%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-APACHE
%license %{crate_instdir}/LICENSE-MIT
%{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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# Remove dev-dependency on sqlx. It is used only for doctests
# https://github.com/launchbadge/sqlx/commit/71f72e2620a7e7b628f8abe0a07978ad155357d9
tomcli set Cargo.toml del dev-dependencies.sqlx

%generate_buildrequires
%cargo_generate_buildrequires -a

%build
%cargo_build -a

%install
%cargo_install -a

%if %{with check}
%check
# * Skip tests that require main sqlx package
%cargo_test -a -- -- --skip options::MySqlConnectOptions
%endif

%changelog
## START: Generated by rpmautospec
* Thu Sep 12 2024 Cristian Le <cristian.le@mpsd.mpg.de> - 0.8.2-1
- import rhbz#2279542
## END: Generated by rpmautospec