1 # Fedora 19 ships with ruby 2, which uses vendorlibdir instead
4 %global ruby_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]')
6 %global ruby_libdir %(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
9 %define release %{rpm_release}%{?dist}
11 Summary: Application Server for hosting Ruby code on any capable middleware
15 Group: System Environment/Daemons
17 URL: http://puppetlabs.com/mcollective/introduction/
18 Source0: http://downloads.puppetlabs.com/mcollective/%{name}-%{version}.tgz
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 Requires: mcollective-common = %{version}-%{release}
21 Packager: R.I.Pienaar <rip@devco.net>
25 Summary: Common libraries for the mcollective clients and servers
26 Group: System Environment/Libraries
29 Requires: rubygem(stomp)
32 The Marionette Collective:
34 Common libraries for the mcollective clients and servers
37 Summary: Client tools for the mcollective Application Server
38 Requires: mcollective-common = %{version}-%{release}
39 Group: Applications/System
42 The Marionette Collective:
44 Client tools for the mcollective Application Server
47 The Marionette Collective:
49 Server for the mcollective Application Server
58 %{__install} -d -m0755 %{buildroot}/%{ruby_libdir}/mcollective
59 %{__install} -d -m0755 %{buildroot}%{_bindir}
60 %{__install} -d -m0755 %{buildroot}%{_sbindir}
61 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/init.d
62 %{__install} -d -m0755 %{buildroot}%{_libexecdir}/mcollective/
63 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective
64 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/plugin.d
65 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/ssl
66 %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mcollective/ssl/clients
67 %{__install} -m0755 bin/mcollectived %{buildroot}%{_sbindir}/mcollectived
68 %{__install} -m0640 etc/server.cfg.dist %{buildroot}%{_sysconfdir}/mcollective/server.cfg
69 %{__install} -m0644 etc/client.cfg.dist %{buildroot}%{_sysconfdir}/mcollective/client.cfg
70 %{__install} -m0444 etc/facts.yaml.dist %{buildroot}%{_sysconfdir}/mcollective/facts.yaml
71 %{__install} -m0444 etc/rpc-help.erb %{buildroot}%{_sysconfdir}/mcollective/rpc-help.erb
72 %{__install} -m0444 etc/data-help.erb %{buildroot}%{_sysconfdir}/mcollective/data-help.erb
73 %{__install} -m0444 etc/discovery-help.erb %{buildroot}%{_sysconfdir}/mcollective/discovery-help.erb
74 %{__install} -m0444 etc/metadata-help.erb %{buildroot}%{_sysconfdir}/mcollective/metadata-help.erb
75 %{__install} -m0444 etc/msg-help.erb %{buildroot}%{_sysconfdir}/mcollective/msg-help.erb
77 %{__install} -m0755 mcollective.init %{buildroot}%{_sysconfdir}/init.d/mcollective
79 %{__install} -m0755 ext/redhat/mcollective.init %{buildroot}%{_sysconfdir}/init.d/mcollective
83 cp -R lib/* %{buildroot}/%{ruby_libdir}/
84 cp -R plugins/* %{buildroot}%{_libexecdir}/mcollective/
85 cp bin/mc-* %{buildroot}%{_sbindir}/
86 cp bin/mco %{buildroot}%{_bindir}/
87 chmod 0755 %{buildroot}%{_sbindir}/*
93 /sbin/chkconfig --add mcollective || :
96 if [ "$1" -ge 1 ]; then
97 /sbin/service mcollective condrestart &>/dev/null || :
101 if [ "$1" = 0 ] ; then
102 /sbin/service mcollective stop > /dev/null 2>&1
103 /sbin/chkconfig --del mcollective || :
108 %{ruby_libdir}/mcollective.rb
109 %{ruby_libdir}/mcollective
110 %{_libexecdir}/mcollective/mcollective
111 %dir %{_sysconfdir}/mcollective
112 %dir %{_sysconfdir}/mcollective/ssl
113 %config %{_sysconfdir}/mcollective/*.erb
116 %attr(0755, root, root)%{_sbindir}/mc-call-agent
117 %attr(0755, root, root)%{_bindir}/mco
119 %config(noreplace)%{_sysconfdir}/mcollective/client.cfg
120 %{_libexecdir}/mcollective/mcollective/application
121 %{_libexecdir}/mcollective/mcollective/pluginpackager
125 %{_sbindir}/mcollectived
126 %{_sysconfdir}/init.d/mcollective
127 %config(noreplace)%{_sysconfdir}/mcollective/server.cfg
128 %config(noreplace)%{_sysconfdir}/mcollective/facts.yaml
129 %dir %{_sysconfdir}/mcollective/ssl/clients
130 %config(noreplace)%{_sysconfdir}/mcollective/plugin.d
133 * Tue Nov 03 2009 R.I.Pienaar <rip@devco.net>