aardvark-dns/aardvark-dns.spec
Your Name 736061dc8b
All checks were successful
Run CI/CD... / main (push) Successful in 12m32s
1.14.0
2025-02-10 15:16:23 +00:00

72 lines
1.5 KiB
RPMSpec

%define debug %nil
%define debug_package %{nil}
%define _libexecdir %{_prefix}/libexec
%define rustver 1.83.0
Name: aardvark-dns
Version: 1.14.0
Release: 1
License: ASL 2.0
Summary: Authoritative dns server for A/AAAA container records
URL: https://github.com/containers/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
Group: Development/Other
BuildRequires: go-md2man
BuildRequires: curl
BuildRequires: git-core
#BuildRequires: pkgconfig(openssl3.3)
%if %{mdvver} > 201610
BuildRequires: rust
BuildRequires: cargo
%endif
%description
Aardvark-dns is an authoritative dns server for A/AAAA
container records. It can forward other requests to
configured resolvers.
Read more about configuration in src/backend/mod.rs. It
is mostly intended to be used with Netavark which will
launch it automatically if both are installed.
%prep
%setup -q
%if %{mdvver} <= 201610
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\
sh -s -- -y --profile default --default-toolchain %{rustver}
%endif
#if !%{defined copr_username}
tar -xf %{SOURCE1}
mkdir -p $HOME/.cargo
cat >$HOME/.cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "$PWD/vendor"
EOF
#endif
%build
%if %{mdvver} <= 201610
source "$HOME/.cargo/env"
%endif
%make build
%install
%makeinstall DESTDIR=%{buildroot} PREFIX=%{_prefix}
%files
%doc README.md LICENSE
%{_libexecdir}/podman/%{name}*
%changelog