From 1285a697c1ba5e7a522e102e8941484882d322c3 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jun 15 2021 07:06:14 +0000 Subject: Avoid repeating the dependency list --- diff --git a/mkosi.spec b/mkosi.spec index 8e37f19..38ac7cd 100644 --- a/mkosi.spec +++ b/mkosi.spec @@ -11,27 +11,21 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools -%if 0%{?el7} -Requires: dnf -Requires: gnupg -Requires: xz -Requires: tar -Requires: e2fsprogs -Requires: squashfs-tools -Requires: veritysetup -%else -Recommends: dnf +%global recoreq %{?el7:Requires}%{!?el7:Recommends} + +%{recoreq}: dnf +%{recoreq}: gnupg +%{recoreq}: xz +%{recoreq}: tar +%{recoreq}: e2fsprogs +%{recoreq}: squashfs-tools +%{recoreq}: veritysetup +%if 0%{?el7} == 0 Recommends: debootstrap Recommends: arch-install-scripts Recommends: edk2-ovmf -Recommends: gnupg -Recommends: xz -Recommends: tar Recommends: btrfs-progs Recommends: dosfstools -Recommends: e2fsprogs -Recommends: squashfs-tools -Recommends: veritysetup Recommends: python3dist(argcomplete) %endif