forked from choria-legacy/marionette-collective
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmcollective.spec
123 lines (101 loc) · 3.29 KB
/
mcollective.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%define release %{rpm_release}%{?dist}
Summary: Application Server for hosting Ruby code on any capable middleware
Name: mcollective
Version: %{version}
Release: %{release}
Group: System Tools
License: Apache License, Version 2
URL: http://marionette-collective.org/
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby
Requires: rubygems
Requires: rubygem-stomp
Requires: mcollective-common = %{version}-%{release}
Packager: R.I.Pienaar <rip@devco.net>
BuildArch: noarch
%package common
Summary: Common libraries for the mcollective clients and servers
Group: System Tools
Requires: ruby
Requires: rubygems
Requires: rubygem-stomp
%description common
The Marionette Collective:
Common libraries for the mcollective clients and servers
%package client
Summary: Client tools for the mcollective Application Server
Requires: mcollective-common = %{version}-%{release}
Requires: ruby
Requires: rubygems
Requires: rubygem-stomp
Group: System Tools
%description client
The Marionette Collective:
Client tools for the mcollective Application Server
%description
The Marionette Collective:
Server for the mcollective Application Server
%prep
%setup -q
%build
%install
rm -rf %{buildroot}
%{__install} -d -m0755 %{buildroot}/%{ruby_sitelib}/mcollective
%{__install} -d -m0755 %{buildroot}/usr/sbin
%{__install} -d -m0755 %{buildroot}/etc/init.d
%{__install} -d -m0755 %{buildroot}/usr/libexec/mcollective/
%{__install} -d -m0755 %{buildroot}/etc/mcollective
%{__install} -d -m0755 %{buildroot}/etc/mcollective/ssl
%{__install} -d -m0755 %{buildroot}/etc/mcollective/ssl/clients
%{__install} -m0755 mcollectived.rb %{buildroot}/usr/sbin/mcollectived
%{__install} -m0640 etc/server.cfg.dist %{buildroot}/etc/mcollective/server.cfg
%{__install} -m0644 etc/client.cfg.dist %{buildroot}/etc/mcollective/client.cfg
%{__install} -m0444 etc/facts.yaml.dist %{buildroot}/etc/mcollective/facts.yaml
%{__install} -m0444 etc/rpc-help.erb %{buildroot}/etc/mcollective/rpc-help.erb
%if 0%{?suse_version}
%{__install} -m0755 mcollective.init %{buildroot}/etc/init.d/mcollective
%else
%{__install} -m0755 mcollective.init-rh %{buildroot}/etc/init.d/mcollective
%endif
cp -R lib/* %{buildroot}/%{ruby_sitelib}/
cp -R plugins/* %{buildroot}/usr/libexec/mcollective/
cp mc-* %{buildroot}/usr/sbin/
cp mc %{buildroot}/usr/sbin/
chmod 0755 %{buildroot}/usr/sbin/*
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add mcollective || :
%postun
if [ "$1" -ge 1 ]; then
/sbin/service mcollective condrestart &>/dev/null || :
fi
%preun
if [ "$1" = 0 ] ; then
/sbin/service mcollective stop > /dev/null 2>&1
/sbin/chkconfig --del mcollective || :
fi
%files common
%doc COPYING
%{ruby_sitelib}/mcollective.rb
%{ruby_sitelib}/mcollective
/usr/libexec/mcollective
%dir /etc/mcollective
%dir /etc/mcollective/ssl
%files client
%attr(0755, root, root)/usr/sbin/mc*
%doc COPYING
%config(noreplace)/etc/mcollective/client.cfg
%config/etc/mcollective/rpc-help.erb
%files
%doc COPYING
/usr/sbin/mcollectived
/etc/init.d/mcollective
%config(noreplace)/etc/mcollective/server.cfg
%config(noreplace)/etc/mcollective/facts.yaml
%dir /etc/mcollective/ssl/clients
%changelog
* Tue Nov 03 2009 R.I.Pienaar <rip@devco.net>
- First release