From eead43e30ab256882c073f2a67787559aa163a33 Mon Sep 17 00:00:00 2001 From: Petr Menšík Date: Feb 28 2022 10:49:26 +0000 Subject: Simplify ifs, install with -p Preserve timestamps of installed files. Reduce a bit ifs support for libidn. libidn might be removed already, keeping for a while. --- diff --git a/whois.spec b/whois.spec index 6bbf260..eec9a35 100644 --- a/whois.spec +++ b/whois.spec @@ -1,13 +1,9 @@ # Package mkpasswd tool -%if 0%{?rhel} -%{bcond_with whois_enables_mkpasswd} -%else %{bcond_without whois_enables_mkpasswd} -%endif -# Add IDN support -%{bcond_without whois_enables_idn} -# Use libidn2 instead of libidn +# Enable IDN, use libidn2 instead of libidn %{bcond_without whois_enables_libidn2} +# Add libidn support +%{bcond_with whois_enables_idn} Name: whois Version: 5.5.12 @@ -20,19 +16,16 @@ Source0: https://github.com/rfc1036/%{name}/archive/v%{version}/%{name}-%{ver BuildRequires: coreutils BuildRequires: gcc BuildRequires: gettext -%if %{with whois_enables_idn} %if %{with whois_enables_libidn2} BuildRequires: pkgconfig(libidn2) >= 2.0.3 -%else +%elif %{with whois_enables_idn} BuildRequires: pkgconfig(libidn) BuildConflicts: pkgconfig(libidn2) -%endif %else BuildConflicts: pkgconfig(libidn) BuildConflicts: pkgconfig(libidn2) %endif %if %{with whois_enables_mkpasswd} -BuildRequires: pkgconfig(libcrypt) BuildRequires: pkgconfig(libxcrypt) >= 4.1 %endif BuildRequires: make @@ -89,7 +82,7 @@ whois tools messages translated into different natural languages. %build %{make_build} CONFIG_FILE="%{_sysconfdir}/%{cfgfile}" \ HAVE_ICONV=1 \ - CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{__global_ldflags}" + CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{__global_ldflags}" INSTALL="install -p" %install %if %{with whois_enables_mkpasswd}