Setting tag omf-5.3-6
[omf.git] / omf-resctl.spec
index 35c9907..929b6bf 100644 (file)
@@ -1,36 +1,34 @@
 #
 #
-# $Id: madwifi.spec 16422 2010-01-04 11:33:08Z thierry $
+# $Id$
 #
 #
-%define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/madwifi/trunk/madwifi.spec $
+%define url $URL$
 
 
-# Marc E. Fiuczynski <mef@cs.princeton.edu>
-# Copyright (C) 2006 The Trustees of Princeton University
+# Thierry Parmentelat - INRIA
+# Copyright (C) 2010 INRIA
 # License is GPL.
 
 %define name omf-resctl
 %define version 5.3
 # License is GPL.
 
 %define name omf-resctl
 %define version 5.3
-%define release 1ubuntu2-2
-%define taglevel 1
+%define taglevel 6
 
 
-%define actual_name %{name}-%{version}-%{release}
+%define plc_name %{name}-%{version}-%{taglevel}
+%define actual_name omf-resctl-5.3-1ubuntu7-2
 
 Summary: OMF Resource Controller - for slivers
 Name: %{name}
 Version: %{version}
 
 Summary: OMF Resource Controller - for slivers
 Name: %{name}
 Version: %{version}
-Release: %{release}
+Release: %{taglevel}
 License: GPL
 License: GPL
-Group: System Environment/Kernel
-Source0: %{actual_name}.noarch.rpm
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Group: System Environment/Base
+Source0: %{plc_name}.tar.bz2
+BuildRoot: %{_tmppath}/%{plc_name}-buildroot
 
 Vendor: NICTA
 
 Vendor: NICTA
-Packager: PlanetLab <devel@planet-lab.eu>
-Distribution: PlanetLab %{plrelease}
+Packager: PlanetLab <devel@planet-lab.org>
+Distribution: %{pldistro} %{plrelease}
 URL: %(echo %{url} | cut -d ' ' -f 2)
 URL: %(echo %{url} | cut -d ' ' -f 2)
+# BuildArch: noarch
 
 
-Requires: imagezip
-Requires: liblog4r-ruby1.8  
-Requires: libxmpp4r-ruby1.8  
 Requires: pciutils  
 Requires: ruby  
 Requires: wget  
 Requires: pciutils  
 Requires: ruby  
 Requires: wget  
@@ -38,31 +36,91 @@ Requires: wireless-tools
 Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
 Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
 
 Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
 Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
 
-Requires: omf-common-5.3  
+Requires: omf-common  
+Requires: liblog4r
+Requires: libxmpp4r
+Requires: imagezip
 
 
-%description The OMF Resource Controller (RC) is the experiment-side
-of the Experiment Eontroller (EC) that lets experimenter control their
+%description 
+The OMF Resource Controller (RC) is the experiment-side of the
+Experiment Eontroller (EC) that lets experimenter control their
 resources. It relies on an XMPP server for exchanging with its EC.
 
 resources. It relies on an XMPP server for exchanging with its EC.
 
+####################
+%define common_actual_name omf-common-5.3-1ubuntu6-2
+
+%package -n omf-common
+Summary: OMF common utilities 
+Group: System Environment/Base
+%description -n omf-common
+Provides utilities common to various OMF components
+
+####################
+%define liblog4r_actual_name liblog4r-ruby1.8-1.2-1
+
+%package -n liblog4r
+Summary:  A logging library for Ruby
+Group: System Environment/Base
+%description -n liblog4r
+A logging library for Ruby, needed by OMF software
+
+####################
+%define libxmpp4r_actual_name libxmpp4r-ruby1.8-1.0-1
+
+%package -n libxmpp4r
+Summary:  XMPP/Jabber library for Ruby
+Group: System Environment/Base
+%description -n libxmpp4r
+An XMPP/Jabber library for Ruby, needed by OMF software
+
+####################
+%define imagezip_actual_name imagezip-1.0.0-3
+
+%package -n imagezip
+Summary:  filesystem image compression tool from EMULAB
+Group: System Environment/Base
+%description -n imagezip
+filesystem image compression tool from EMULAB
+
+####################
+
 %prep
 %prep
-%setup -n %{actual_name}
+%setup -n %{plc_name}
 
 %build
 rm -rf $RPM_BUILD_ROOT
 
 
 %build
 rm -rf $RPM_BUILD_ROOT
 
-make sources
 mkdir unwrap
 mkdir unwrap
-cd unwrap
-rpm2cpio ../omf-resctl*.rmp | cpio -diu
+
+make omf-resctl 
+(cd unwrap; rpm2cpio ../%{actual_name}.noarch.rpm | cpio -diu)
+make omf-common
+(cd unwrap ; rpm2cpio ../%{common_actual_name}.noarch.rpm | cpio -diu)
+make liblog4r 
+(cd unwrap; rpm2cpio ../%{liblog4r_actual_name}.noarch.rpm | cpio -diu)
+make libxmpp4r 
+(cd unwrap; rpm2cpio ../%{libxmpp4r_actual_name}.noarch.rpm | cpio -diu)
+make imagezip 
+(cd unwrap; rpm2cpio ../%{imagezip_actual_name}.i386.rpm | cpio -diu)
+
+# remove any default config if any
+rm -f unwrap/etc/omf-resctl-%{version}/omf-resctl.yaml
+
+# cleanup any svn sequels
+find unwrap -type d -name .svn -print0 | xargs -0 rm -rf
+
 
 %install
 rm -fr $RPM_BUILD_ROOT
 
 
 %install
 rm -fr $RPM_BUILD_ROOT
 
-rsync -av unwrap/ $RPM_BUILD_ROOT
+rsync -a unwrap/ $RPM_BUILD_ROOT
+
+install -D -m 600 omf-resctl.yaml.in $RPM_BUILD_ROOT/etc/omf-resctl-%{version}/omf-resctl.yaml.in
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+####################
 %files
 %defattr(-,root,root)
 /etc
 %files
 %defattr(-,root,root)
 /etc
@@ -70,8 +128,68 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/omf-resctl-%{version}
 /usr/share/doc
 
 /usr/share/omf-resctl-%{version}
 /usr/share/doc
 
+#
 %post
 %post
-# tweak config in /etc/omf-resctl-5.3/
-mkdir /etc/omf-resctl-5.3/
+if [ -x /sbin/chkconfig ] ; then
+    /sbin/chkconfig --add omf-resctl-%{version}
+    /sbin/chkconfig omf-resctl-%{version} on
+    service omf-resctl-%{version} restart
+fi
+
+%preun
+# 0 = erase, 1 = upgrade
+if [ $1 -eq 0 ] ; then
+    service omf-resctl-%{version} stop
+    /sbin/chkconfig omf-resctl-%{version} off
+    /sbin/chkconfig --del omf-resctl-%{version}
+fi
+
+####################
+%files -n omf-common
+%defattr(-,root,root)
+/usr/share/omf-common-%{version}
+/usr/share/doc/omf-common-%{version}
+
+#
+%post -n omf-common
+ln -s /usr/bin/ruby /usr/bin/ruby1.8
+
+####################
+%files -n liblog4r
+%defattr(-,root,root)
+/usr/lib/ruby/1.8/log4r.rb
+/usr/lib/ruby/1.8/log4r
+/usr/share/doc/liblog4r-ruby1.8
+
+####################
+%files -n libxmpp4r
+%defattr(-,root,root)
+/usr/lib/ruby/1.8/xmpp4r.rb
+/usr/lib/ruby/1.8/xmpp4r
+/usr/share/doc/libxmpp4r-ruby1.8
 
 
+####################
+%files -n imagezip
+%defattr(-,root,root)
+/usr/bin/imagedump
+/usr/bin/imageunzip
+/usr/bin/imagezip
+/usr/share/doc/imagezip
+
+####################
 %changelog
 %changelog
+* Thu Jul 08 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - omf-5.3-6
+- updated omf packages
+
+* Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-5
+- cleaned up specfile for smoother upgrades
+
+* Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-4
+- fix stupid typo in tag 5.3-3
+
+* Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-3
+- fetch from the tagged omf-5.3-federation-v1.1 - and turn SHA1SUM checking back on again
+
+* Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-2
+- package the exp. controller as well for user convenience
+