From f9532a59568191f200c85cfbf82f940ccffad698 Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Wed, 6 Nov 2013 09:31:15 +0100 Subject: Don't install mof files for disabled providers When provider is disabled via WITH-PROVIDER=OFF in cmake, don't install even the mof file. Fixes ticket #170. --- CMakeLists.txt | 1 + mof/CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++---- openlmi-providers.spec | 1 - 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13886bc..2f6ec4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ option(WITH-ACCOUNT "Build account provider" ON) option(WITH-HARDWARE "Build hardware provider" ON) option(WITH-LOGICALFILE "Build logical file provider" ON) option(WITH-REALMD "Build RealmD provider" ON) +option(WITH-PCP "Build PCP provider" ON) option(WITH-INDMANAGER "Build indication manager" ON) option(WITH-SOFTWARE "Build software provider" ON) option(WITH-JOURNALD "Build journald provider" ON) diff --git a/mof/CMakeLists.txt b/mof/CMakeLists.txt index cfdc181..f367434 100644 --- a/mof/CMakeLists.txt +++ b/mof/CMakeLists.txt @@ -1,6 +1,46 @@ -file(GLOB MOFS *.mof) +install(FILES 05_LMI_Qualifiers.mof 30_LMI_Jobs.mof DESTINATION share/openlmi-providers/) + +if (WITH-FAN) + install(FILES 60_LMI_Fan.mof DESTINATION share/openlmi-providers/) +endif (WITH-FAN) + +if (WITH-POWER) + install(FILES 60_LMI_PowerManagement.mof DESTINATION share/openlmi-providers/) +endif (WITH-POWER) + +if (WITH-SERVICE) + install(FILES 60_LMI_Service.mof DESTINATION share/openlmi-providers/) +endif (WITH-SERVICE) + +if (WITH-ACCOUNT) + install(FILES 60_LMI_Account.mof DESTINATION share/openlmi-providers/) +endif (WITH-ACCOUNT) + +if (WITH-HARDWARE) + install(FILES 60_LMI_Hardware.mof DESTINATION share/openlmi-providers/) +endif (WITH-HARDWARE) + +if (WITH-LOGICALFILE) + install(FILES 60_LMI_LogicalFile.mof DESTINATION share/openlmi-providers/) +endif (WITH-LOGICALFILE) + +if (WITH-REALMD) + install(FILES 60_LMI_Realmd.mof DESTINATION share/openlmi-providers/) +endif (WITH-REALMD) + +if (WITH-PCP) + install(FILES 60_LMI_PCP.mof DESTINATION share/openlmi-providers/) +endif (WITH-PCP) + +if (WITH-SOFTWARE) + install(FILES 60_LMI_Software.mof LMI_Software.reg + 60_LMI_Software_MethodParameters.mof + 70_LMI_SoftwareIndicationFilters.mof + DESTINATION share/openlmi-providers/) +endif (WITH-SOFTWARE) + +if (WITH-JOURNALD) + install(FILES 60_LMI_Journald.mof DESTINATION share/openlmi-providers/) +endif (WITH-JOURNALD) -foreach(MOF ${MOFS}) - install(FILES ${MOF} DESTINATION share/openlmi-providers/) -endforeach(MOF ${MOFS}) diff --git a/openlmi-providers.spec b/openlmi-providers.spec index 64ab9ce..e15c471 100644 --- a/openlmi-providers.spec +++ b/openlmi-providers.spec @@ -360,7 +360,6 @@ pushd src/software install -m 755 -d $RPM_BUILD_ROOT/%{_libexecdir}/pegasus install -m 755 pycmpiLMI_Software-cimprovagt $RPM_BUILD_ROOT/%{_libexecdir}/pegasus/ popd # src/software -cp mof/LMI_Software.reg $RPM_BUILD_ROOT/%{_datadir}/%{name}/ # pcp pushd src/pcp -- cgit