File dog-rs.spec of Package dog-rs
#
# spec file for package dog-rs
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: dog-rs
Version: v0.1.0
Release: 0
Summary: Command-line DNS client
License: EUPL-1.2
URL: https://github.com/ogham/dog
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.xz
BuildRequires: rust-packaging
BuildRequires: pkgconfig(openssl)
%description
%{summary}.
%prep
%setup -qa1
mkdir .cargo
cat >.cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source."https://github.com/llogiq/mutagen"]
git = "https://github.com/llogiq/mutagen"
branch = "master"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build
cargo build --release --locked %{?_smp_mflags}
%install
cargo install --root=%{buildroot}%{_prefix} --path .
# remove residue crate file
rm %{buildroot}%{_prefix}/.crates.toml
rm %{buildroot}%{_prefix}/.crates2.json
%files
%license LICENCE
%doc README.md
%{_bindir}/dog
%changelog