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