[mcollective] Update to Fedora's new ruby guidelines.

stevetraylen stevetraylen at fedoraproject.org
Wed Apr 18 20:34:22 UTC 2012


commit 0ccf279d161081a2aa474eadadb3ef30582bdcb3
Author: Steve Traylen <steve.traylen at cern.ch>
Date:   Thu Apr 19 00:33:21 2012 +0200

    Update to Fedora's new ruby guidelines.

 mcollective.spec |   74 ++++++++++++++++++++++++++++++------------------------
 1 files changed, 41 insertions(+), 33 deletions(-)
---
diff --git a/mcollective.spec b/mcollective.spec
index 647f30d..4f24192 100644
--- a/mcollective.spec
+++ b/mcollective.spec
@@ -1,42 +1,47 @@
-%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
+%if 0%{?el5}%{?el6}%{?fc16}
+%global ruby_vendorlibdir %{_prefix}/lib/ruby/site_ruby/1.8
+%global ruby_version 1.8
+%else
+%global ruby_version 1.9.1
+%endif
 
-Summary: A framework to build server orchestration or parallel job execution systems
-Name: mcollective
-Version: 1.3.3
-Release: 1%{?dist}
-Group: Applications/System
-License: ASL 2.0
+Summary:   A framework to build server orchestration or parallel job execution systems
+Name:      mcollective
+Version:   1.3.3
+Release:   2%{?dist}
+Group:     Applications/System
+License:   ASL 2.0
 
-URL: http://marionette-collective.org/
+URL:       http://docs.puppetlabs.com/mcollective/
 
-Source0: http://puppetlabs.com/downloads/mcollective/%{name}-%{version}.tgz
-Source1: mcollective.service
-Patch1: 0001-get-rid-of-vendor-libraries.patch
-Patch2: 0002-Don-t-enable-services-by-default.patch
+Source0:   http://puppetlabs.com/downloads/mcollective/%{name}-%{version}.tgz
+Source1:   mcollective.service
+Patch1:    0001-get-rid-of-vendor-libraries.patch
+Patch2:    0002-Don-t-enable-services-by-default.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires: ruby
+BuildRequires: ruby-devel
 %if 0%{?fedora} >= 15
 BuildRequires: systemd-units
 %endif
 
-Requires: mcollective-common = %{version}-%{release}
+BuildArch: noarch
+
+Requires:  mcollective-common = %{version}-%{release}
 
 %if 0%{?fedora} >= 15
-Requires(post): systemd-units
-Requires(preun): systemd-units
+Requires(post):   systemd-units
+Requires(preun):  systemd-units
 Requires(postun): systemd-units
-Requires(post): systemd-sysv
+Requires(post):   systemd-sysv
 %endif
 
-BuildArch: noarch
-
 %package common
 Summary: Common libraries for the mcollective clients and servers
 Group: Applications/System
 Requires: ruby
-Requires: ruby(abi) = 1.8
+Requires: ruby(abi) = %{ruby_version}
 Requires: rubygems
 Requires: rubygem(json)
 Requires: rubygem(stomp)
@@ -75,25 +80,25 @@ rm -rf lib/mcollective/vendor
 %install
 rm -rf %{buildroot}
 
-%{__install} -d -m0755  %{buildroot}/%{ruby_sitelib}/mcollective
-cp --preserve=timestamps --recursive lib/* %{buildroot}/%{ruby_sitelib}
+%{__install} -d -m0755  %{buildroot}/%{ruby_vendorlibdir}/mcollective
+cp --preserve=timestamps --recursive lib/* %{buildroot}/%{ruby_vendorlibdir}
 
 %{__install} -d -m0755  %{buildroot}/usr/sbin
 %{__install} -p -m0755 bin/mcollectived %{buildroot}/usr/sbin/mcollectived
 %{__install} -p -m0755 bin/mco %{buildroot}/usr/sbin/mco
 
-%if 0%{?fedora} <= 14 || 0%{?rhel}
+%if 0%{?fedora} <= 14 || 0%{?rhel} 
 %{__install} -d -m0755  %{buildroot}%{_initrddir}
-%{__install} -p -m0755 mcollective.init %{buildroot}%{_initrddir}/mcollective
+%{__install} -p -m0755 mcollectivepinit %{buildroot}%{_initrddir}/mcollective
 %endif
 
-%if 0%{?fedora} >= 15
+%if 0%{?fedora} >= 15 
 %{__install} -d -m0755  %{buildroot}%{_unitdir}
 %{__install} -p -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/mcollective.service
 %endif
 
-%{__install} -d -m0755  %{buildroot}/usr/libexec/mcollective
-cp --preserve=timestamps --recursive plugins/* %{buildroot}/usr/libexec/mcollective
+%{__install} -d -m0755  %{buildroot}%{_libexecdir}/mcollective
+cp --preserve=timestamps --recursive plugins/* %{buildroot}%{_libexecdir}/mcollective
 
 %{__install} -d -m0755  %{buildroot}/etc/mcollective
 %{__install} -d -m0755  %{buildroot}/etc/mcollective/ssl
@@ -161,11 +166,11 @@ fi
 %files common
 %defattr(-,root,root,-)
 %doc COPYING
-%{ruby_sitelib}/mcollective.rb
-%{ruby_sitelib}/mcollective
-/usr/libexec/mcollective
-%dir /etc/mcollective
-%dir /etc/mcollective/ssl
+%{ruby_vendorlibdir}/mcollective.rb
+%{ruby_vendorlibdir}/mcollective
+%{_libexecdir}/mcollective
+%dir %{_sysconfdir}/mcollective
+%dir %{_sysconfdir}/mcollective/ssl
 
 %files client
 %defattr(-,root,root,-)
@@ -180,7 +185,7 @@ fi
 %config(noreplace) /etc/mcollective/server.cfg
 %config(noreplace) /etc/mcollective/facts.yaml
 %{_sbindir}/mcollectived
-%if 0%{?fedora} <= 14 || 0%{?rhel}
+%if 0%{?fedora} <= 14 || 0%{?rhel} 
 %{_initrddir}/mcollective
 %endif
 %if 0%{?fedora} >= 15
@@ -189,6 +194,9 @@ fi
 %dir /etc/mcollective/ssl/clients
 
 %changelog
+* Wed Apr 18 2012 Steve Traylen <steve.traylen at cern.ch> - 1.3.3-2
+- Update to Fedora's new ruby guidelines.
+
 * Tue Apr 17 2012 Jeffrey Ollie <jeff at ocjtech.us> - 1.3.3-1
 - 1.3.3
 - see releasenotes: http://docs.puppetlabs.com/mcollective/releasenotes.html


More information about the scm-commits mailing list