X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=ext%2Fredhat%2Fmcollective.spec;h=bd5d9276223aa20e7a24d0ab9ad27c84a91e2022;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=d11def7cf4ed71f7594f5e6ed7feab780c5fbdd5;hpb=b87d2f4e68281062df1913440ca5753ae63314a9;p=packages%2Fprecise%2Fmcollective.git diff --git a/ext/redhat/mcollective.spec b/ext/redhat/mcollective.spec index d11def7..bd5d927 100644 --- a/ext/redhat/mcollective.spec +++ b/ext/redhat/mcollective.spec @@ -1,4 +1,11 @@ -%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")} +# Fedora 19 ships with ruby 2, which uses vendorlibdir instead +# of sitelibdir +%if 0%{?fedora} >= 19 +%global ruby_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]') +%else +%global ruby_libdir %(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']") +%endif + %define release %{rpm_release}%{?dist} Summary: Application Server for hosting Ruby code on any capable middleware @@ -10,8 +17,6 @@ License: ASL 2.0 URL: http://puppetlabs.com/mcollective/introduction/ Source0: http://downloads.puppetlabs.com/mcollective/%{name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ruby -BuildRequires: ruby(abi) >= 1.8 Requires: mcollective-common = %{version}-%{release} Packager: R.I.Pienaar BuildArch: noarch @@ -19,8 +24,7 @@ BuildArch: noarch %package common Summary: Common libraries for the mcollective clients and servers Group: System Environment/Libraries -Requires: ruby -Requires: ruby(abi) >= 1.8 +Requires: ruby >= 1.8 Requires: rubygems Requires: rubygem(stomp) @@ -51,7 +55,7 @@ Server for the mcollective Application Server %install rm -rf %{buildroot} -%{__install} -d -m0755 %{buildroot}/%{ruby_sitelib}/mcollective +%{__install} -d -m0755 %{buildroot}/%{ruby_libdir}/mcollective %{__install} -d -m0755 %{buildroot}%{_bindir} %{__install} -d -m0755 %{buildroot}%{_sbindir} %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/init.d @@ -76,7 +80,7 @@ rm -rf %{buildroot} %endif -cp -R lib/* %{buildroot}/%{ruby_sitelib}/ +cp -R lib/* %{buildroot}/%{ruby_libdir}/ cp -R plugins/* %{buildroot}%{_libexecdir}/mcollective/ cp bin/mc-* %{buildroot}%{_sbindir}/ cp bin/mco %{buildroot}%{_bindir}/ @@ -101,8 +105,8 @@ fi %files common %doc COPYING -%{ruby_sitelib}/mcollective.rb -%{ruby_sitelib}/mcollective +%{ruby_libdir}/mcollective.rb +%{ruby_libdir}/mcollective %{_libexecdir}/mcollective/mcollective %dir %{_sysconfdir}/mcollective %dir %{_sysconfdir}/mcollective/ssl