rpm: Added support for Amazon Linux 2
diff --git a/rpm/SPECS/nginx-module.spec.in b/rpm/SPECS/nginx-module.spec.in
index 43e2f8e..ada9436 100644
--- a/rpm/SPECS/nginx-module.spec.in
+++ b/rpm/SPECS/nginx-module.spec.in
@@ -4,8 +4,12 @@
%if 0%{?rhel} || 0%{?amzn} || 0%{?fedora}
%define _group System Environment/Daemons
+%if 0%{?amzn} >= 2
+BuildRequires: openssl11-devel
+%else
BuildRequires: openssl-devel
%endif
+%endif
%if 0%{?suse_version} >= 1315
%define _group Productivity/Networking/Web/Servers
@@ -19,6 +23,11 @@
%define dist .el7
%endif
+%if (0%{?rhel} == 7) && (0%{?amzn} == 2)
+%define epoch 1
+Epoch: %{epoch}
+%endif
+
%if 0%{?rhel} == 8
%define epoch 1
Epoch: %{epoch}
diff --git a/rpm/SPECS/nginx.spec.in b/rpm/SPECS/nginx.spec.in
index 39d81f7..f3b91ea 100644
--- a/rpm/SPECS/nginx.spec.in
+++ b/rpm/SPECS/nginx.spec.in
@@ -13,7 +13,7 @@
%define _group System Environment/Daemons
%endif
-%if 0%{?rhel} == 7
+%if (0%{?rhel} == 7) && (0%{?amzn} == 0)
%define epoch 1
Epoch: %{epoch}
Requires(pre): shadow-utils
@@ -22,6 +22,14 @@
%define dist .el7
%endif
+%if (0%{?rhel} == 7) && (0%{?amzn} == 2)
+%define epoch 1
+Epoch: %{epoch}
+Requires(pre): shadow-utils
+Requires: openssl11 >= 1.1.1
+BuildRequires: openssl11-devel >= 1.1.1
+%endif
+
%if 0%{?rhel} == 8
%define epoch 1
Epoch: %{epoch}