Blob Blame History Raw
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}

%global crate openssl

Name:           rust-openssl
Version:        0.10.64
Release:        %autorelease
Summary:        OpenSSL bindings

License:        Apache-2.0
URL:            https://crates.io/crates/openssl
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * drop feature and dependencies for unstable BoringSSL support
# * drop feature and dependencies for building against vendored OpenSSL sources
# * bump hex dev-dependency from 0.3 to 0.4
Patch:          openssl-fix-metadata.diff
# * set "PROFILE=SYSTEM" as default argument for SSL_CTX_set_cipher_list
#   so applications that use the "default" context follow system crypto policy
Patch:          0001-set-PROFILE-SYSTEM-as-default-cipher-list.patch

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
OpenSSL bindings.}

%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
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{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}+bindgen-devel
Summary:        %{summary}
BuildArch:      noarch

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

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

%changelog
%autochangelog