# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1194559255 28800
# Node ID fbc36f46718fd7390d43e61bbb35276a1ba55a6e
# Parent 90ffd19dda747eb615f12b10aa04e4f9bc978b31
Cleanups and schema install additions to the RPM spec
- Removed references to the register_bash.sh script
- Added schema install/uninstall to scriptlets
I have tested this on Fedora 8 with the bundled pegasus installation.
We still need to figure out how we're going to get the CIM v2.16 Exp
schema on the box, but if you do that manually (into /root/virt) before
installing the RPM, it works as expected.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 90ffd19dda74 -r fbc36f46718f libvirt-cim.spec.in
--- a/libvirt-cim.spec.in Thu Nov 08 13:54:24 2007 -0800
+++ b/libvirt-cim.spec.in Thu Nov 08 14:00:55 2007 -0800
@@ -34,7 +34,7 @@ rm -fr %{buildroot}
rm -fr %{buildroot}
%makeinstall PROVIDERDIR=%{buildroot}%{_libdir}/cmpi
-cp provider-register.sh register_base.sh %{buildroot}%{_datadir}/libvirt-cim/
+cp provider-register.sh %{buildroot}%{_datadir}/libvirt-cim/
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la
@@ -43,17 +43,34 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a
%clean
rm -fr %{buildroot}
+%pre
+%define REGISTRATION %{_datadir}/%{name}/*.registration
+%define SCHEMA %{_datadir}/%{name}/*.mof
+%define NAMESPACE /root/virt
+
+%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
+ -n %{NAMESPACE} \
+ -r %{REGISTRATION} -m %{SCHEMA} || true
+
%post
/sbin/ldconfig
-%postun
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n %{NAMESPACE} \
+ -r %{REGISTRATION} -m %{SCHEMA} || true
+
+%preun
/sbin/ldconfig
+
+%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
+ -n %{NAMESPACE} \
+ -r %{REGISTRATION} -m %{SCHEMA} || true
%files
%defattr(-, root, root)
%doc README doc/CodingStyle doc/SubmittingPatches
-%doc provider-register.sh register_base.sh
+%doc provider-register.sh
%{_libdir}/lib*.so*
%{_libdir}/cmpi/lib*.so*
%{_datadir}/libvirt-cim/*.sh
Show replies by date