summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJeff '2 bits' Bachtel <jbachtel@bericotechnologies.com>2014-05-07 17:53:02 +0000
committerEC2 Default User <jbachtel@bericotechnologies.com>2014-05-07 18:42:25 +0000
commitfb5bd35fc2c67efae47f75d17870f47fe7c95ac9 (patch)
treed66e3e17eeb85e10f074eef92439ab0d662d42d6 /ext
parentf1e7d2c2ec1faa0a121418452f1bff52db2bdfaf (diff)
downloadpuppet-fb5bd35fc2c67efae47f75d17870f47fe7c95ac9.tar.gz
Previously, RPMS built on Amazon Linux would
point to the improper ruby directory, or would have improper dependencies. Use %{amzn} as a rpm macro to determine if the rpm is being built on an Amazon Linux distro. If %{amzn} is set, use the Fedora/RHEL7 method of discovering ruby lib directory. Use the RHEL 6 init system (sysvinit). Use the RHEL 5 libselinux-ruby dependency.
Diffstat (limited to 'ext')
-rw-r--r--ext/redhat/puppet.spec.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/redhat/puppet.spec.erb b/ext/redhat/puppet.spec.erb
index 15d4eeefd..ee982a3f6 100644
--- a/ext/redhat/puppet.spec.erb
+++ b/ext/redhat/puppet.spec.erb
@@ -3,7 +3,7 @@
# Fedora 17 ships with ruby 1.9, RHEL 7 with ruby 2.0, which use vendorlibdir instead
# of sitelibdir. Adjust our target if installing on f17 or rhel7.
-%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || %{_vendor} == "amazon"
+%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?amzn} >= 1
%global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]')
%else
%global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
@@ -48,7 +48,7 @@ Requires: rubygem-json
%if 0%{?fedora} || 0%{?rhel} >= 6
%{!?_without_selinux:Requires: ruby(selinux), libselinux-utils}
%else
-%if ( 0%{?rhel} && 0%{?rhel} == 5 ) || %{_vendor} == "amazon"
+%if ( 0%{?rhel} && 0%{?rhel} == 5 ) || 0%{?amzn} >= 1
%{!?_without_selinux:Requires: libselinux-ruby, libselinux-utils}
%endif
%endif