Setting tag omf-5.3-11
[omf.git] / omf-resctl.spec
1 # Thierry Parmentelat - INRIA
2 # Copyright (C) 2010 INRIA
3 # License is GPL.
4
5 %define name omf-resctl
6 %define version 5.3
7 %define taglevel 11
8
9 %define plc_name %{name}-%{version}-%{taglevel}
10 %define resctl_actual_name omf-resctl-5.3-5.3.1-1
11
12 Summary: OMF Resource Controller - for slivers
13 Name: %{name}
14 Version: %{version}
15 Release: %{taglevel}
16 License: GPL
17 Group: System Environment/Base
18 Source0: %{plc_name}.tar.bz2
19 BuildRoot: %{_tmppath}/%{plc_name}-buildroot
20
21 Vendor: NICTA
22 Packager: OneLab <devel@planet-lab.org>
23 Distribution: %{pldistro} %{plrelease}
24 URL: %{SCMURL}
25
26 BuildArch: noarch
27
28 Requires: pciutils  
29 Requires: ruby  
30 Requires: wget  
31 Requires: wireless-tools  
32 Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
33 Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
34
35 Requires: omf-common  
36 Requires: liblog4r
37 Requires: libxmpp4r
38
39 %description 
40 The OMF Resource Controller (RC) is the experiment-side of the
41 Experiment Controller (EC) that lets experimenter control their
42 resources. It relies on an XMPP server for exchanging with its EC.
43
44 ####################
45 %define common_actual_name omf-common-5.3-5.3.1-1
46
47 %package -n omf-common
48 Summary: OMF common utilities 
49 Group: System Environment/Base
50 %description -n omf-common
51 Provides utilities common to various OMF components
52
53 ####################
54 %define liblog4r_actual_name liblog4r-ruby1.8-1.2-1
55
56 %package -n liblog4r
57 Summary:  A logging library for Ruby
58 Group: System Environment/Base
59 %description -n liblog4r
60 A logging library for Ruby, needed by OMF software
61
62 ####################
63 %define libxmpp4r_actual_name libxmpp4r-ruby1.8-1.0-1
64
65 %package -n libxmpp4r
66 Summary:  XMPP/Jabber library for Ruby
67 Group: System Environment/Base
68 %description -n libxmpp4r
69 An XMPP/Jabber library for Ruby, needed by OMF software
70
71 ####################
72
73 %prep
74 %setup -n %{plc_name}
75
76 %build
77 rm -rf $RPM_BUILD_ROOT
78
79 mkdir unwrap
80
81 make omf-resctl 
82 (cd unwrap; rpm2cpio ../%{resctl_actual_name}.noarch.rpm | cpio -diu)
83 make omf-common
84 (cd unwrap ; rpm2cpio ../%{common_actual_name}.noarch.rpm | cpio -diu)
85 make liblog4r 
86 (cd unwrap; rpm2cpio ../%{liblog4r_actual_name}.noarch.rpm | cpio -diu)
87 make libxmpp4r 
88 (cd unwrap; rpm2cpio ../%{libxmpp4r_actual_name}.noarch.rpm | cpio -diu)
89
90 # remove any default config if any
91 rm -f unwrap/etc/omf-resctl-%{version}/omf-resctl.yaml
92
93 # cleanup any svn sequels
94 find unwrap -type d -name .svn -print0 | xargs -0 rm -rf
95 find unwrap -type d -name .git -print0 | xargs -0 rm -rf
96
97
98 %install
99 rm -fr $RPM_BUILD_ROOT
100
101 rsync -a unwrap/ $RPM_BUILD_ROOT
102
103 install -D -m 600 omf-resctl.yaml.in $RPM_BUILD_ROOT/etc/omf-resctl-%{version}/omf-resctl.yaml.in
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 ####################
109 %files
110 %defattr(-,root,root)
111 /etc
112 /usr/sbin
113 /usr/share/omf-resctl-%{version}
114 /usr/share/doc
115
116 #
117 %post
118 if [ -x /sbin/chkconfig ] ; then
119     /sbin/chkconfig --add omf-resctl-%{version}
120     /sbin/chkconfig omf-resctl-%{version} on
121     service omf-resctl-%{version} restart
122 fi
123
124 %preun
125 # 0 = erase, 1 = upgrade
126 if [ $1 -eq 0 ] ; then
127     service omf-resctl-%{version} stop
128     /sbin/chkconfig omf-resctl-%{version} off
129     /sbin/chkconfig --del omf-resctl-%{version}
130 fi
131
132 ####################
133 %files -n omf-common
134 %defattr(-,root,root)
135 /usr/share/omf-common-%{version}
136 /usr/share/doc/omf-common-%{version}
137
138 #
139 %post -n omf-common
140 ln -s /usr/bin/ruby /usr/bin/ruby1.8
141
142 ####################
143 %files -n liblog4r
144 %defattr(-,root,root)
145 /usr/lib/ruby/1.8/log4r.rb
146 /usr/lib/ruby/1.8/log4r
147 /usr/share/doc/liblog4r-ruby1.8
148
149 ####################
150 %files -n libxmpp4r
151 %defattr(-,root,root)
152 /usr/lib/ruby/1.8/xmpp4r.rb
153 /usr/lib/ruby/1.8/xmpp4r
154 /usr/share/doc/libxmpp4r-ruby1.8
155
156 ####################
157 %changelog
158 * Mon Aug 29 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-11
159 - updated with latest from NICTA
160
161 * Tue Feb 01 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-10
162 - move to more recent releases of omf-resctl & related stuff
163
164 * Mon Jan 24 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-9
165 - no semantic change - just fixed specfile for git URL
166
167 * Mon Aug 30 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - omf-5.3-8
168 - new packages from NICTA
169
170 * Tue Jul 13 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - omf-5.3-7
171 - fix omf-expctl build
172
173 * Thu Jul 08 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - omf-5.3-6
174 - updated omf packages
175
176 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-5
177 - cleaned up specfile for smoother upgrades
178
179 * Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-4
180 - fix stupid typo in tag 5.3-3
181
182 * Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-3
183 - fetch from the tagged omf-5.3-federation-v1.1 - and turn SHA1SUM checking back on again
184
185 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-2
186 - package the exp. controller as well for user convenience
187