Adapt to new packaging

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 6 years ago
parent a50c77046d
commit 657cd2f21f
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,5 +1,6 @@
# Generated by rust2rpm
%bcond_without check
# * Tests are run in infrastructure
%bcond_with check
%global debug_package %{nil}
%global crate git2
@ -9,6 +10,7 @@ Version: 0.7.5
Release: 1%{?dist}
Summary: Bindings to libgit2 for interoperating with git repositories
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/git2
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
@ -19,38 +21,142 @@ Patch1: rust-git2-no-include_depth.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(bitflags) >= 1.0.0 with crate(bitflags) < 2.0.0)
BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0)
BuildRequires: (crate(libgit2-sys) >= 0.7.7 with crate(libgit2-sys) < 0.8.0)
BuildRequires: (crate(log) >= 0.4.0 with crate(log) < 0.5.0)
BuildRequires: (crate(openssl-probe) >= 0.1.0 with crate(openssl-probe) < 0.2.0)
BuildRequires: (crate(openssl-sys) >= 0.9.0 with crate(openssl-sys) < 0.10.0)
BuildRequires: (crate(url) >= 1.0.0 with crate(url) < 2.0.0)
BuildRequires: (crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0)
BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(libgit2-sys/curl) >= 0.7.7 with crate(libgit2-sys/curl) < 0.8.0)
BuildRequires: (crate(libgit2-sys/default) >= 0.7.7 with crate(libgit2-sys/default) < 0.8.0)
BuildRequires: (crate(libgit2-sys/https) >= 0.7.7 with crate(libgit2-sys/https) < 0.8.0)
BuildRequires: (crate(libgit2-sys/ssh) >= 0.7.7 with crate(libgit2-sys/ssh) < 0.8.0)
BuildRequires: (crate(libgit2-sys/ssh_key_from_memory) >= 0.7.7 with crate(libgit2-sys/ssh_key_from_memory) < 0.8.0)
BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0)
BuildRequires: (crate(openssl-probe/default) >= 0.1.0 with crate(openssl-probe/default) < 0.2.0)
BuildRequires: (crate(openssl-sys/default) >= 0.9.0 with crate(openssl-sys/default) < 0.10.0)
BuildRequires: (crate(url/default) >= 1.0.0 with crate(url/default) < 2.0.0)
%if %{with check}
# [dev-dependencies]
BuildRequires: (crate(docopt) >= 1.0.0 with crate(docopt) < 2.0.0)
BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0)
BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0)
BuildRequires: (crate(tempdir) >= 0.3.7 with crate(tempdir) < 0.4.0)
BuildRequires: (crate(thread-id) >= 3.3.0 with crate(thread-id) < 4.0.0)
BuildRequires: (crate(time) >= 0.1.39 with crate(time) < 0.2.0)
BuildRequires: (crate(docopt/default) >= 1.0.0 with crate(docopt/default) < 2.0.0)
BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires: (crate(tempdir/default) >= 0.3.7 with crate(tempdir/default) < 0.4.0)
BuildRequires: (crate(thread-id/default) >= 3.3.0 with crate(thread-id/default) < 4.0.0)
BuildRequires: (crate(time/default) >= 0.1.39 with crate(time/default) < 0.2.0)
%endif
%description
%{summary}.
%global _description \
Bindings to libgit2 for interoperating with git repositories. This library is\
both threadsafe and memory safe and allows both reading and writing git\
repositories.
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
Bindings to libgit2 for interoperating with git repositories. This library is
both threadsafe and memory safe and allows both reading and writing git
repositories.
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%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
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+curl-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+curl-devel %{_description}
This package contains library source intended for building other packages
which use "curl" feature of "%{crate}" crate.
%files -n %{name}+curl-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+https-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+https-devel %{_description}
This package contains library source intended for building other packages
which use "https" feature of "%{crate}" crate.
%files -n %{name}+https-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+openssl-probe-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+openssl-probe-devel %{_description}
This package contains library source intended for building other packages
which use %{crate} from crates.io.
which use "openssl-probe" feature of "%{crate}" crate.
%files -n %{name}+openssl-probe-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+openssl-sys-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+openssl-sys-devel %{_description}
This package contains library source intended for building other packages
which use "openssl-sys" feature of "%{crate}" crate.
%files -n %{name}+openssl-sys-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+ssh-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+ssh-devel %{_description}
This package contains library source intended for building other packages
which use "ssh" feature of "%{crate}" crate.
%files -n %{name}+ssh-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+ssh_key_from_memory-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+ssh_key_from_memory-devel %{_description}
This package contains library source intended for building other packages
which use "ssh_key_from_memory" feature of "%{crate}" crate.
%files -n %{name}+ssh_key_from_memory-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+unstable-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+unstable-devel %{_description}
This package contains library source intended for building other packages
which use "unstable" feature of "%{crate}" crate.
%files -n %{name}+unstable-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
@ -67,12 +173,6 @@ which use %{crate} from crates.io.
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml
%changelog
* Fri Aug 10 2018 Josh Stone <jistone@redhat.com> - 0.7.5-1
- Update to 0.7.5

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
# `cargo test` usually eats more than 1G.
m: 4G

@ -0,0 +1,13 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/tests/rust.git"
dest: rust
tests:
- rust/cargo-test
environment:
pkg: rust-git2
Loading…
Cancel
Save