Blame aardvark-dns.spec

0bc43ef
# trust-dns-{client,server} not available
0bc43ef
# using vendored deps
0bc43ef
Packit f55e1e7
# RHEL doesn't include the package rust-packaging which provides %%__cargo macro, but EPEL
Packit f55e1e7
# does. So we set it separately here and skip rust-packaging dependency for RHEL.
Packit f55e1e7
# Buildability without EPEL is essential for packit builds.
Packit f55e1e7
# ELN doesn't need this.
Packit f55e1e7
%if %{defined rhel} && 0%{?rhel} < 10
Packit f55e1e7
%define __cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' %{_bindir}/cargo
Packit f55e1e7
%endif
Packit f55e1e7
2dce5e1
%global with_debug 1
2dce5e1
2dce5e1
%if 0%{?with_debug}
2dce5e1
%global _find_debuginfo_dwz_opts %{nil}
2dce5e1
%global _dwz_low_mem_die_limit 0
2dce5e1
%else
0bc43ef
%global debug_package %{nil}
2dce5e1
%endif
1285e1a
0bc43ef
Name: aardvark-dns
Packit fa897de
%if %{defined copr_username}
Packit f55e1e7
Epoch: 102
Packit f55e1e7
%endif
Packit f55e1e7
# DO NOT TOUCH the Version string!
Packit f55e1e7
# The TRUE source of this specfile is:
Packit f55e1e7
# https://github.com/containers/podman/blob/main/rpm/podman.spec
Packit f55e1e7
# If that's what you're reading, Version must be 0, and will be updated by Packit for
Packit f55e1e7
# copr and koji builds.
Packit f55e1e7
# If you're reading this on dist-git, the version is automatically filled in by Packit.
Packit 80c1594
Version: 1.9.0
Packit fa897de
# The `AND` needs to be uppercase in the License for SPDX compatibility
b916759
License: Apache-2.0 AND MIT AND Zlib
1285e1a
Release: %autorelease
Packit fa897de
%if %{defined golang_arches_future}
4f12ae3
ExclusiveArch: %{golang_arches_future}
Packit f55e1e7
%else
Packit f55e1e7
ExclusiveArch: aarch64 ppc64le s390x x86_64
Packit f55e1e7
%endif
0bc43ef
Summary: Authoritative DNS server for A/AAAA container records
0bc43ef
URL: https://github.com/containers/%{name}
7b2c822
# Tarballs fetched from upstream's release page
Packit f55e1e7
Source0: %{url}/archive/v%{version}.tar.gz
Packit f55e1e7
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
0bc43ef
BuildRequires: cargo
1285e1a
BuildRequires: git-core
0bc43ef
BuildRequires: make
Packit f55e1e7
%if %{defined rhel}
Packit fa897de
# rust-toolset requires the `local` repo enabled on non-koji ELN build environments
Packit f55e1e7
BuildRequires: rust-toolset
Packit f55e1e7
%else
6409db6
BuildRequires: rust-packaging
0bc43ef
BuildRequires: rust-srpm-macros
Packit f55e1e7
%endif
Packit f55e1e7
0bc43ef
%description
0bc43ef
%{summary}
0bc43ef
0bc43ef
Forwards other request to configured resolvers.
0bc43ef
Read more about configuration in `src/backend/mod.rs`.
0bc43ef
0bc43ef
%prep
Packit f55e1e7
%autosetup -Sgit %{name}-%{version}
Packit f55e1e7
# Following steps are only required on environments like koji which have no
Packit f55e1e7
# network access and thus depend on the vendored tarball. Copr pulls
Packit f55e1e7
# dependencies directly from the network.
Packit fa897de
%if !%{defined copr_username}
4d69e08
tar fx %{SOURCE1}
4d69e08
mkdir -p .cargo
4d69e08
4d69e08
cat >.cargo/config << EOF
4d69e08
[source.crates-io]
4d69e08
replace-with = "vendored-sources"
4d69e08
4d69e08
[source.vendored-sources]
4d69e08
directory = "vendor"
4d69e08
EOF
Packit f55e1e7
%endif
0bc43ef
0bc43ef
%build
Packit f55e1e7
%{__make} CARGO="%{__cargo}" build
0bc43ef
0bc43ef
%install
0bc43ef
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
0bc43ef
0bc43ef
%files
0bc43ef
%license LICENSE
0bc43ef
%dir %{_libexecdir}/podman
0bc43ef
%{_libexecdir}/podman/%{name}
0bc43ef
0bc43ef
%changelog
0bc43ef
%autochangelog