# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1197066994 28800
# Node ID 6fae41fcbfbdcdc9c8b205c93df6daf6c4d558a9
# Parent 0d80882209b4002da9283e4cfe17d48cb1155d45
Build support for base schema installation
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 0d80882209b4 -r 6fae41fcbfbd Makefile.am
--- a/Makefile.am Fri Dec 07 14:36:30 2007 -0800
+++ b/Makefile.am Fri Dec 07 14:36:34 2007 -0800
@@ -1,5 +1,5 @@
# Copyright IBM Corp. 2007
-SUBDIRS = libxkutil src doc
+SUBDIRS = libxkutil src doc base_schema
MOFS = \
schema/ComputerSystem.mof \
@@ -89,6 +89,9 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk
libvirt-cim.spec.in libvirt-cim.spec \
doc/CodingStyle doc/SubmittingPatches
+preinstall:
+ sh -x base_schema/install_base_schema.sh `pwd`/base_schema
+
# Un/Register the providers and class definitions from/to the current CIMOM.
# @CIMSERVER@ is set by the configure script
postinstall:
diff -r 0d80882209b4 -r 6fae41fcbfbd base_schema/Makefile.am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/base_schema/Makefile.am Fri Dec 07 14:36:34 2007 -0800
@@ -0,0 +1,9 @@
+CIM_SCHEMA_VER = 216
+CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental
+CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip
+
+dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof
+dist_pkgdata_SCRIPTS = install_base_schema.sh
+
+$(CIM_SCHEMA_ZIP):
+ wget
http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCH...
\ No newline at end of file
diff -r 0d80882209b4 -r 6fae41fcbfbd configure.ac
--- a/configure.ac Fri Dec 07 14:36:30 2007 -0800
+++ b/configure.ac Fri Dec 07 14:36:34 2007 -0800
@@ -87,6 +87,8 @@ AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bi
# Autogenerate the Makefile
AC_CONFIG_FILES([
+ base_schema/install_base_schema.sh
+ base_schema/Makefile
libxkutil/Makefile
libxkutil/tests/Makefile
src/Makefile
diff -r 0d80882209b4 -r 6fae41fcbfbd libvirt-cim.spec.in
--- a/libvirt-cim.spec.in Fri Dec 07 14:36:30 2007 -0800
+++ b/libvirt-cim.spec.in Fri Dec 07 14:36:34 2007 -0800
@@ -55,6 +55,8 @@ rm -fr $RPM_BUILD_ROOT
%post
/sbin/ldconfig
+%{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name}
+
%{_datadir}/%{name}/provider-register.sh -t pegasus \
-n /@CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} || true
@@ -76,7 +78,10 @@ rm -fr $RPM_BUILD_ROOT
%{_libdir}/cmpi/lib*.so*
%{_datadir}/libvirt-cim/*.sh
%{_datadir}/libvirt-cim/*.mof
+%{_datadir}/libvirt-cim/cimv*-interop_mof
%{_datadir}/libvirt-cim/*.registration
+%{_datadir}/libvirt-cim/fix_schema.patch
+%{_datadir}/libvirt-cim/cimv*-MOFs.zip
%changelog
* Fri Oct 26 2007 Daniel Veillard <veillard(a)redhat.com> - 0.1-1