summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-11-25 23:49:43 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-11-26 17:25:09 -0700
commit30b9f2f8eca951058f0aa0e4cefc617d4de148f7 (patch)
treeb8a22c1dff1602dd1c86d2ef0ca6cce4d437fd49
parentb173fd25731fe525205358a2fc9f783e03c34b6c (diff)
downloadrubygem-unicorn-30b9f2f8eca951058f0aa0e4cefc617d4de148f7.tar.gz
rubygem-unicorn-30b9f2f8eca951058f0aa0e4cefc617d4de148f7.tar.xz
rubygem-unicorn-30b9f2f8eca951058f0aa0e4cefc617d4de148f7.zip
add macros for el6
On RHEL 6 prior to 6.5, many of the modern Ruby and Gem RPM macros are not available. Conditionally define these macros if the happen to be missing. (See also https://rhn.redhat.com/errata/RHBA-2013-1694.html)
-rw-r--r--rubygem-unicorn.spec10
1 files changed, 10 insertions, 0 deletions
diff --git a/rubygem-unicorn.spec b/rubygem-unicorn.spec
index 5a00b9b..c809d7e 100644
--- a/rubygem-unicorn.spec
+++ b/rubygem-unicorn.spec
@@ -40,6 +40,16 @@ Provides: rubygem(%{gem_name}) = %{version}
# Do not autorequire shebangs in the -doc subpackage
%global __requires_exclude_from ^%{gem_instdir}/(t|test|script|examples)/.*$
+# macros for RHEL6 compatibility:
+%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)}
+%{!?gem_instdir: %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}}
+%{!?gem_libdir: %global gem_libdir %{gem_instdir}/lib}
+%{!?gem_cache: %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem}
+%{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec}
+%{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}}
+%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
+
+
%description
Unicorn is an HTTP server for Rack applications designed to only serve fast
clients on low-latency, high-bandwidth connections and take advantage of