PackagingDrafts/CMPIPlugins

In Fedora 12 and above These are guidelines for packaging CMPI plugins, used by the tog-pegasus or sblim-sfcb CIMOMs. Such plugins are called "CIM providers", and each uses the CMPI interface to the CIMOM.

 Make sure each provider. This is a virtual provide that each CIMOM has.   All plugins are shared libraries, ending in .so. These are to be installed in the %{_libdir}/cmpi/ directory.  Some of the providers may have hard-coded shared object names, which are dlopened at runtime. rpmlint will throw warnings to move *.so files to a -devel package, but this would be incorrect for these packages. Such warnings may be ignored.  All the .registration and .mof files go to %{_datadir}/%{name}  Each provider should register in %postin and unregister in %preun to the cim server. %pre if [ "$1" -gt 1 ]; then %{_datadir}/%{name}/provider-register.sh \ -d -t pegasus \ -m %{_datadir}/%{name}/Linux_Network.mof \ -r %{_datadir}/%{name}/Linux_Network.registration \ > /dev/null 2>&1 || :; fi
 * 1) If upgrading, deregister old version

%post /sbin/ldconfig if [ "$1" -ge 1 ]; then %{_datadir}/%{name}/provider-register.sh \ -t pegasus \ -m %{_datadir}/%{name}/Linux_Network.mof \ -r %{_datadir}/%{name}/Linux_Network.registration \ > /dev/null 2>&1 || :; fi
 * 1) Register Schema and Provider

%preun if [ "$1" -eq 0 ]; then %{_datadir}/%{name}/provider-register.sh \ -d -t pegasus \ -m %{_datadir}/%{name}/Linux_Network.mof \ -r %{_datadir}/%{name}/Linux_Network.registration \ > /dev/null 2>&1 || :; fi
 * 1) Deregister only if not upgrading

%postun -p /sbin/ldconfig 