You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-libssh2-sys/rust-libssh2-sys.spec

86 lines
2.0 KiB

# Generated by rust2rpm 18
%bcond_without check
%global debug_package %{nil}
%global crate libssh2-sys
Name: rust-%{crate}
Version: 0.2.23
Release: %autorelease
Summary: Native bindings to the libssh2 library
7 years ago
# Upstream license specification: MIT/Apache-2.0
# https://github.com/alexcrichton/ssh2-rs/issues/75
License: MIT or ASL 2.0
URL: https://crates.io/crates/libssh2-sys
Source: %{crates_source}
7 years ago
# Initial patched metadata
# * drop windows-specific dependencies and features
# * drop dependency and feature for unused zlib-ng support
# * drop feature for vendored OpenSSL sources
7 years ago
Patch0: libssh2-sys-fix-metadata.diff
# Doesn't seem to be upstreamable
Patch1: 0001-build.rs-always-use-pkg-config.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Native bindings to the libssh2 library.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig(libssh2)
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
5 years ago
%{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
5 years ago
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
# No bundled deps
rm -vrf libssh2/
5 years ago
find -type f -perm /111 -exec chmod -c -x '{}' '+'
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'pkgconfig(libssh2)'
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog