Commit d121203c authored by Jonathan Perkin's avatar Jonathan Perkin

Add support for RHEL6 and OL6.

parent 5c2ad740
...@@ -138,6 +138,17 @@ ...@@ -138,6 +138,17 @@
%{error:Oracle Enterprise Linux %{oelver} is unsupported} %{error:Oracle Enterprise Linux %{oelver} is unsupported}
%endif %endif
%endif %endif
%else
%if %(test -f /etc/oracle-release && echo 1 || echo 0)
%define elver %(rpm -qf --qf '%%{version}\\n' /etc/enterprise-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
%if "%elver" == "6"
%define distro_description Oracle Linux 6
%define distro_releasetag el6
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else
%{error:Oracle Linux %{oelver} is unsupported}
%endif
%else %else
%if %(test -f /etc/redhat-release && echo 1 || echo 0) %if %(test -f /etc/redhat-release && echo 1 || echo 0)
%define rhelver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g') %define rhelver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
...@@ -152,10 +163,17 @@ ...@@ -152,10 +163,17 @@
%define distro_releasetag rhel5 %define distro_releasetag rhel5
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils net-tools %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else
%if "%rhelver" == "6"
%define distro_description Red Hat Enterprise Linux 6
%define distro_releasetag rhel6
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils net-tools
%else %else
%{error:Red Hat Enterprise Linux %{rhelver} is unsupported} %{error:Red Hat Enterprise Linux %{rhelver} is unsupported}
%endif %endif
%endif %endif
%endif
%else %else
%if %(test -f /etc/SuSE-release && echo 1 || echo 0) %if %(test -f /etc/SuSE-release && echo 1 || echo 0)
%define susever %(rpm -qf --qf '%%{version}\\n' /etc/SuSE-release) %define susever %(rpm -qf --qf '%%{version}\\n' /etc/SuSE-release)
...@@ -179,6 +197,7 @@ ...@@ -179,6 +197,7 @@
%endif %endif
%endif %endif
%endif %endif
%endif
%else %else
%define generic_kernel %(uname -r | cut -d. -f1-2) %define generic_kernel %(uname -r | cut -d. -f1-2)
%define distro_description Generic Linux (kernel %{generic_kernel}) %define distro_description Generic Linux (kernel %{generic_kernel})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment