1 %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")}
2 %define release %{rpm_release}%{?dist}
4 Summary: Application Server for hosting Ruby code on any capable middleware
8 Group: System Environment/Daemons
10 URL: http://puppetlabs.com/mcollective/introduction/
11 Source0: http://downloads.puppetlabs.com/mcollective/%{name}-%{version}.tgz
12 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14 BuildRequires: ruby(abi) >= 1.8
15 Requires: mcollective-common = %{version}-%{release}
16 Packager: R.I.Pienaar <rip@devco.net>
20 Summary: Common libraries for the mcollective clients and servers
21 Group: System Environment/Libraries
23 Requires: ruby(abi) >= 1.8
25 Requires: rubygem(stomp)
28 The Marionette Collective:
30 Common libraries for the mcollective clients and servers
33 Summary: Client tools for the mcollective Application Server
34 Requires: mcollective-common = %{version}-%{release}
35 Group: Applications/System
38 The Marionette Collective:
40 Client tools for the mcollective Application Server
43 The Marionette Collective:
45 Server for the mcollective Application Server
54 %{__install} -d -m0755 %{buildroot}/%{ruby_sitelib}/mcollective
55 %{__install} -d -m0755 %{buildroot}%{_bindir}
56 %{__install} -d -m0755 %{buildroot}%{_sbindir}
57 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/init.d
58 %{__install} -d -m0755 %{buildroot}%{_libexecdir}/mcollective/
59 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective
60 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/plugin.d
61 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/ssl
62 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/ssl/clients
63 %{__install} -m0755 bin/mcollectived %{buildroot}%{_sbindir}/mcollectived
64 %{__install} -m0640 etc/server.cfg.dist %{buildroot}%{_sysconfdir}/mcollective/server.cfg
65 %{__install} -m0644 etc/client.cfg.dist %{buildroot}%{_sysconfdir}/mcollective/client.cfg
66 %{__install} -m0444 etc/facts.yaml.dist %{buildroot}%{_sysconfdir}/mcollective/facts.yaml
67 %{__install} -m0444 etc/rpc-help.erb %{buildroot}%{_sysconfdir}/mcollective/rpc-help.erb
68 %{__install} -m0444 etc/data-help.erb %{buildroot}%{_sysconfdir}/mcollective/data-help.erb
69 %{__install} -m0444 etc/discovery-help.erb %{buildroot}%{_sysconfdir}/mcollective/discovery-help.erb
70 %{__install} -m0444 etc/metadata-help.erb %{buildroot}%{_sysconfdir}/mcollective/metadata-help.erb
71 %{__install} -m0444 etc/msg-help.erb %{buildroot}%{_sysconfdir}/mcollective/msg-help.erb
73 %{__install} -m0755 mcollective.init %{buildroot}%{_sysconfdir}/init.d/mcollective
75 %{__install} -m0755 ext/redhat/mcollective.init %{buildroot}%{_sysconfdir}/init.d/mcollective
79 cp -R lib/* %{buildroot}/%{ruby_sitelib}/
80 cp -R plugins/* %{buildroot}%{_libexecdir}/mcollective/
81 cp bin/mc-* %{buildroot}%{_sbindir}/
82 cp bin/mco %{buildroot}%{_bindir}/
83 chmod 0755 %{buildroot}%{_sbindir}/*
89 /sbin/chkconfig --add mcollective || :
92 if [ "$1" -ge 1 ]; then
93 /sbin/service mcollective condrestart &>/dev/null || :
97 if [ "$1" = 0 ] ; then
98 /sbin/service mcollective stop > /dev/null 2>&1
99 /sbin/chkconfig --del mcollective || :
104 %{ruby_sitelib}/mcollective.rb
105 %{ruby_sitelib}/mcollective
106 %{_libexecdir}/mcollective/mcollective
107 %dir %{_sysconfdir}/mcollective
108 %dir %{_sysconfdir}/mcollective/ssl
109 %config %{_sysconfdir}/mcollective/*.erb
112 %attr(0755, root, root)%{_sbindir}/mc-call-agent
113 %attr(0755, root, root)%{_bindir}/mco
115 %config(noreplace)%{_sysconfdir}/mcollective/client.cfg
116 %{_libexecdir}/mcollective/mcollective/application
117 %{_libexecdir}/mcollective/mcollective/pluginpackager
121 %{_sbindir}/mcollectived
122 %{_sysconfdir}/init.d/mcollective
123 %config(noreplace)%{_sysconfdir}/mcollective/server.cfg
124 %config(noreplace)%{_sysconfdir}/mcollective/facts.yaml
125 %dir %{_sysconfdir}/mcollective/ssl/clients
126 %config(noreplace)%{_sysconfdir}/mcollective/plugin.d
129 * Tue Nov 03 2009 R.I.Pienaar <rip@devco.net>