# cargo test is disabled by default as it requires etherparse, and doesn't do much
# make test / python scapy requires unshare and CLONE_NETNS which aren't allowed on koji
%bcond_with check
# No devel stuff in released Fedora
%global __cargo_is_lib() false
%global crate libslirp
Name: rust-%{crate}
Version: 4.2.2
Release: 6%{?dist}
Summary: High-level bindings & helper process for libslirp
License: MIT
URL: https://crates.io/crates/libslirp
Source: %{crates_source}
# For rust-ipnetwork 0.17.0
# https://gitlab.freedesktop.org/slirp/libslirp-rs/-/merge_requests/7
Patch0: libslirp-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
%global _description %{expand:
High-level bindings & helper process for libslirp.}
%description %{_description}
%package -n %{crate}-helper
Summary: %{summary}
# * ASL 2.0
# * ASL 2.0 or MIT
# * BSD
# * MIT
# * MIT or ASL 2.0
# * Unlicense or MIT
License: MIT and ASL 2.0 and BSD
%description -n %{crate}-helper %{_description}
%files -n %{crate}-helper
%license LICENSE
%{_bindir}/libslirp-helper
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Sun Aug 16 15:01:34 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.2.2-6
- Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 24 2020 Dusty Mabe <dusty@dustymabe.com> - 4.2.2-4
- Respin. We updated rust-ipnetwork to 0.17.0
* Tue May 12 2020 Igor Raits <ignatenkobrain@fedoraproject.org. - 4.2.2-3
- Rename subpackage to a libslirp-helper
* Mon May 11 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.2.2-2
- Fixup license
* Wed May 06 21:46:00 CEST 2020 Marc-André Lureau <marcandre.lureau@redhat.com> - 4.2.2-1
- Initial package