redhat: Drop pandoc requirement for Amazon Linux

Amazon Linux 2023 and later define the fedora macro, so the spec
requires pandoc there. Amazon Linux does not ship pandoc, which makes
builddep and rpmbuild fail even though release tarballs already
contain the pre-built man pages in buildlib/pandoc-prebuilt.

Skip the pandoc build requirement when the amzn macro is defined so the
packages build from release tarballs using the pre-built man pages.

Reviewed-by: Dan Cherniavsky <dchern@amazon.com>
Reviewed-by: Yonatan Nachum <ynachum@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index d69fcde..8046dfd 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -82,8 +82,9 @@
 %define cmake_install DESTDIR=%{buildroot} make install
 %endif
 
-%if 0%{?fedora} >= 25 || 0%{?rhel} == 8
-# pandoc was introduced in FC25, Centos8
+# pandoc was introduced in FC25, Centos8. Amazon Linux does not ship pandoc,
+# build there from release tarballs with pre-built man pages.
+%if (0%{?fedora} >= 25 || 0%{?rhel} == 8) && !0%{?amzn}
 BuildRequires: pandoc
 %endif