From 0b84386fb5bbaf0c577287209d80a6e2b754b8be Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jan 15 2018 15:57:22 +0000 Subject: fix if conditions Signed-off-by: Igor Gnatenko --- diff --git a/erlang.spec b/erlang.spec index efc339b..b47e56f 100644 --- a/erlang.spec +++ b/erlang.spec @@ -72,7 +72,7 @@ Summary: General-purpose programming language and runtime environment Group: Development/Languages License: ASL 2.0 URL: https://www.erlang.org -%if 0%{?el7}%{?fedora} +%if ! (0%{?rhel} && 0%{?rhel} <= 6) VCS: scm:git:https://github.com/erlang/otp %endif Source0: https://github.com/erlang/otp/archive/OTP-%{version}/otp-OTP-%{version}.tar.gz @@ -118,13 +118,11 @@ BuildRequires: erlang %endif %endif -%if 0%{?el7}%{?fedora} +%if ! (0%{?rhel} && 0%{?rhel} <= 6) # for BuildRequires: systemd-devel BuildRequires: systemd -Requires(post): systemd -Requires(preun):systemd -Requires(postun):systemd +%{?systemd_requires} Requires: systemd %endif BuildRequires: autoconf @@ -1116,7 +1114,7 @@ ln -s "${jinterface_lib_dir}priv/OtpErlang.jar" "$RPM_BUILD_ROOT%{_javadir}/%{na %endif %{__with_java} # systemd-related stuff -%if 0%{?el7}%{?fedora} +%if ! (0%{?rhel} && 0%{?rhel} <= 6) install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/epmd.service install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/epmd.socket install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/epmd@.service @@ -1500,7 +1498,7 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ %endif %{_libdir}/erlang/releases/* %{_libdir}/erlang/usr/ -%if 0%{?el7}%{?fedora} +%if ! (0%{?rhel} && 0%{?rhel} <= 6) %{_unitdir}/epmd.service %{_unitdir}/epmd.socket %{_unitdir}/epmd@.service