diff --git a/.rust2rpm.conf b/.rust2rpm.conf new file mode 100644 index 0000000..19296f6 --- /dev/null +++ b/.rust2rpm.conf @@ -0,0 +1,5 @@ +[DEFAULT] +buildrequires = + pkgconfig(libssh2) +lib.requires = + pkgconfig(libssh2) diff --git a/libssh2-sys-fix-metadata.diff b/libssh2-sys-fix-metadata.diff index 238ccd6..d7ec534 100644 --- a/libssh2-sys-fix-metadata.diff +++ b/libssh2-sys-fix-metadata.diff @@ -1,5 +1,5 @@ ---- libssh2-sys-0.2.11/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ libssh2-sys-0.2.11/Cargo.toml 2018-09-17T15:11:54.418385-07:00 +--- libssh2-sys-0.2.11/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ libssh2-sys-0.2.11/Cargo.toml 2018-11-04T17:50:31.913289+01:00 @@ -33,7 +33,5 @@ [build-dependencies.pkg-config] diff --git a/rust-libssh2-sys.spec b/rust-libssh2-sys.spec index c01841f..a487c35 100644 --- a/rust-libssh2-sys.spec +++ b/rust-libssh2-sys.spec @@ -6,7 +6,7 @@ Name: rust-%{crate} Version: 0.2.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Native bindings to the libssh2 library # Upstream license specification: MIT/Apache-2.0 @@ -17,34 +17,48 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # Initial patched metadata # * No Windows Patch0: libssh2-sys-fix-metadata.diff -# # Doesn't seem to be upstreamable +# Doesn't seem to be upstreamable Patch1: 0001-build.rs-always-use-pkg-config.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: (crate(libz-sys) >= 1.0.21 with crate(libz-sys) < 2.0.0) -BuildRequires: (crate(openssl-sys) >= 0.9.35 with crate(openssl-sys) < 0.10.0) -# [build-dependencies] -BuildRequires: (crate(cc) >= 1.0.25 with crate(cc) < 2.0.0) -BuildRequires: (crate(pkg-config) >= 0.3.11 with crate(pkg-config) < 0.4.0) +BuildRequires: (crate(cc/default) >= 1.0.25 with crate(cc/default) < 2.0.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(libz-sys/default) >= 1.0.21 with crate(libz-sys/default) < 2.0.0) +BuildRequires: (crate(openssl-sys/default) >= 0.9.35 with crate(openssl-sys/default) < 0.10.0) +BuildRequires: (crate(pkg-config/default) >= 0.3.11 with crate(pkg-config/default) < 0.4.0) BuildRequires: pkgconfig(libssh2) -%description -%{summary}. +%global _description \ +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 +%{cargo_registry}/%{crate}-%{version}/ + +%package -n %{name}+default-devel +Summary: %{summary} BuildArch: noarch -%description devel -Native bindings to the libssh2 library. +%description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -N @@ -65,10 +79,10 @@ rm -vrf libssh2/ %cargo_test %endif -%files devel -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sun Nov 04 2018 Igor Gnatenko - 0.2.11-2 +- Adapt to new packaging + * Mon Sep 17 2018 Josh Stone - 0.2.11-1 - Update to 0.2.11