summaryrefslogtreecommitdiffstats
path: root/openlmi-providers.spec
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2013-05-13 13:33:34 +0200
committerRadek Novacek <rnovacek@redhat.com>2013-05-13 13:33:34 +0200
commit41d6143573157a999ce0ef8f5854a1f4bacd4a69 (patch)
tree063f7dccd8ed517cab5c6e90aad09386c20b5772 /openlmi-providers.spec
parentafc343e81566c7707d2ee67c1f47a9ca23b8cd9f (diff)
downloadopenlmi-providers-41d6143573157a999ce0ef8f5854a1f4bacd4a69.tar.gz
openlmi-providers-41d6143573157a999ce0ef8f5854a1f4bacd4a69.tar.xz
openlmi-providers-41d6143573157a999ce0ef8f5854a1f4bacd4a69.zip
Added .spec file, mainly for nightly builds.
Diffstat (limited to 'openlmi-providers.spec')
-rw-r--r--openlmi-providers.spec509
1 files changed, 509 insertions, 0 deletions
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
new file mode 100644
index 0000000..a4b287a
--- /dev/null
+++ b/openlmi-providers.spec
@@ -0,0 +1,509 @@
+Name: openlmi-providers
+Version: 0.0.22
+Release: 1%{?dist}
+Summary: Set of basic CIM providers
+
+License: LGPLv2+
+URL: http://fedorahosted.org/openlmi/
+Source0: http://fedorahosted.org/released/openlmi-providers/%{name}-%{version}.tar.gz
+
+# Upstream name has been changed from cura-providers to openlmi-providers
+Provides: cura-providers%{?_isa} = %{version}-%{release}
+Obsoletes: cura-providers < 0.0.10-1
+
+BuildRequires: cmake
+BuildRequires: konkretcmpi-devel >= 0.9.0-2
+BuildRequires: sblim-cmpi-devel
+BuildRequires: cim-schema
+# For openlmi-power
+BuildRequires: upower-devel
+# For openlmi-fan
+BuildRequires: lm_sensors-devel
+# For openlmi-account
+BuildRequires: libuser-devel
+BuildRequires: python2-devel
+# For openlmi-hardware
+BuildRequires: pciutils-devel
+# For openlmi-register-pegasus script
+Requires: python2
+# sblim-sfcb or tog-pegasus
+# (required to be present during install/uninstall for registration)
+Requires: cim-server
+Requires(pre): cim-server
+Requires(preun): cim-server
+Requires(post): cim-server
+
+# XXX
+# Just because we have wired python's scripts
+# Remove in future
+BuildRequires: python-setuptools
+
+%description
+%{name} is set of (usually) small CMPI providers (agents) for basic
+monitoring and management of host system using Common Information
+Model (CIM).
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Provides: cura-providers-devel%{?_isa} = %{version}-%{release}
+Obsoletes: cura-providers-devel < 0.0.10-1
+
+%description devel
+%{summary}.
+
+%package -n openlmi-fan
+Summary: CIM provider for controlling fans
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Provides: cura-fan%{?_isa} = %{version}-%{release}
+Obsoletes: cura-fan < 0.0.10-1
+
+%description -n openlmi-fan
+%{summary}.
+
+
+%package -n openlmi-powermanagement
+Summary: Power management CIM provider
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: upower
+# For Linux_ComputerSystem
+Requires: sblim-cmpi-base
+Provides: cura-powermanagement%{?_isa} = %{version}-%{release}
+Obsoletes: cura-powermanagement < 0.0.10-1
+
+%description -n openlmi-powermanagement
+%{summary}.
+
+
+%package -n openlmi-service
+Summary: CIM provider for controlling system services
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Provides: cura-service%{?_isa} = %{version}-%{release}
+Obsoletes: cura-service < 0.0.10-1
+
+%description -n openlmi-service
+%{summary}.
+
+%package -n openlmi-account
+Summary: CIM provider for managing accounts on system
+Requires: %{name}%{?_isa} = %{version}-%{release}
+# For Linux_ComputerSystem
+Requires: sblim-cmpi-base
+Provides: cura-account%{?_isa} = %{version}-%{release}
+Obsoletes: cura-account < 0.0.10-1
+
+%description -n openlmi-account
+%{summary}.
+
+%package -n openlmi-hardware
+Summary: CIM provider for hardware on system
+Requires: %{name}%{?_isa} = %{version}-%{release}
+# For Linux_ComputerSystem
+Requires: sblim-cmpi-base
+
+%description -n openlmi-hardware
+%{summary}.
+
+%package -n openlmi-python
+Summary: Python namespace package for pywbem providers
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+Requires: python-setuptools
+Requires: cmpi-bindings-pywbem
+
+%description -n openlmi-python
+The openlmi-python package contains python namespace package for
+all openlmi python providers using cmpi-bindings-pywbem.
+
+%package -n openlmi-software
+Summary: CIM providers for software management
+Requires: %{name} = %{version}-%{release}
+Requires: openlmi-python = %{version}-%{release}
+Provides: cura-software = %{version}-%{release}
+Obsoletes: cura-software < 0.0.10-1
+BuildArch: noarch
+
+Requires: yum
+# For Linux_ComputerSystem
+Requires: sblim-cmpi-base
+
+%description -n openlmi-software
+The openlmi-software package contains CMPI providers for management of software
+through yum package manager with Common Information Managemen (CIM) protocol.
+
+The providers can be registered in any CMPI-aware CIMOM, both OpenPegasus and
+SFCB were tested.
+
+%package -n openlmi-logicalfile
+Summary: CIM provider for reading files and directories
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: sblim-cmpi-base
+
+%description -n openlmi-logicalfile
+%{summary}.
+
+%package -n openlmi-realmd
+Summary: CIM provider for Realmd
+Requires: %{name}%{?_isa} = %{version}-%{release}
+# For Linux_ComputerSystem
+Requires: sblim-cmpi-base
+
+%description -n openlmi-realmd
+The openlmi-realmd package contains CMPI providers for Realmd, which is an on
+demand system DBus service, which allows callers to configure network
+authentication and domain membership in a standard way.
+
+%prep
+%setup -q
+
+%build
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%{cmake} ..
+popd
+
+make %{?_smp_mflags} -C %{_target_platform}
+
+pushd src/python
+%{__python} setup.py build
+popd # src/python
+# for software providers
+pushd src/software
+%{__python} setup.py build
+popd # src/software
+
+%install
+make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
+
+# XXX
+# Remove pythonies
+# Don't forget to remove this dirty hack in the future
+rm -rf "$RPM_BUILD_ROOT"/usr/bin/*.py
+rm -rf "$RPM_BUILD_ROOT"/usr/lib/python*
+
+pushd src/python
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd # src/python
+
+# for software providers
+pushd src/software
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd # src/software
+cp mof/LMI_Software.reg $RPM_BUILD_ROOT/%{_datadir}/%{name}/
+
+
+%files
+%doc README COPYING
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/05_LMI_Qualifiers.mof
+%{_datadir}/%{name}/30_LMI_Jobs.mof
+%{_libdir}/libopenlmicommon.so.*
+%attr(755, root, root) %{_bindir}/openlmi-mof-register
+%attr(755, root, root) %{_libexecdir}/openlmi-register-pegasus
+%attr(755, root, root) %{_libexecdir}/openlmi-cimmof
+
+%files devel
+%{_bindir}/openlmi-doc-class2rst
+%{_bindir}/openlmi-doc-class2uml
+%{_libdir}/libopenlmicommon.so
+%{_libdir}/pkgconfig/openlmi.pc
+%{_includedir}/openlmi/openlmi.h
+%{_datadir}/cmake/Modules/OpenLMIMacros.cmake
+%{_datadir}/cmake/Modules/FindOpenLMI.cmake
+%{_datadir}/cmake/Modules/FindCMPI.cmake
+%{_datadir}/cmake/Modules/FindKonkretCMPI.cmake
+
+%files -n openlmi-fan
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_Fan.so
+%{_datadir}/%{name}/60_LMI_Fan.mof
+%{_datadir}/%{name}/60_LMI_Fan.reg
+
+%files -n openlmi-powermanagement
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_PowerManagement.so
+%{_datadir}/%{name}/60_LMI_PowerManagement.mof
+%{_datadir}/%{name}/60_LMI_PowerManagement.reg
+
+%files -n openlmi-service
+%doc README COPYING
+%attr(755, root, root) %{_libexecdir}/servicedisc.sh
+%attr(755, root, root) %{_libexecdir}/serviceutil.sh
+%{_libdir}/cmpi/libcmpiLMI_Service.so
+%{_datadir}/%{name}/60_LMI_Service.mof
+%{_datadir}/%{name}/60_LMI_Service.reg
+
+%files -n openlmi-account
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_Account.so
+%{_datadir}/%{name}/60_LMI_Account.mof
+%{_datadir}/%{name}/60_LMI_Account.reg
+%attr(755, root, root) %{_libexecdir}/pegasus/cmpiLMI_Account-cimprovagt
+
+%files -n openlmi-hardware
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_Hardware.so
+%{_datadir}/%{name}/60_LMI_Hardware.mof
+%{_datadir}/%{name}/60_LMI_Hardware.reg
+
+%files -n openlmi-python
+%doc README COPYING
+%dir %{python_sitelib}/openlmi
+%{python_sitelib}/openlmi-*
+%dir %{python_sitelib}/openlmi/common
+%{python_sitelib}/openlmi/common/*.py
+%{python_sitelib}/openlmi/common/*.py[co]
+
+%files -n openlmi-software
+%doc README COPYING
+%dir %{python_sitelib}/openlmi/software
+%{python_sitelib}/openlmi/software/*
+%{python_sitelib}/openlmi_software-*
+
+%{_datadir}/%{name}/60_LMI_Software.mof
+%{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof
+%{_datadir}/%{name}/LMI_Software.reg
+
+%files -n openlmi-logicalfile
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_LogicalFile.so
+%{_datadir}/%{name}/60_LMI_LogicalFile.mof
+%{_datadir}/%{name}/60_LMI_LogicalFile.reg
+
+%files -n openlmi-realmd
+%doc README COPYING
+%{_libdir}/cmpi/libcmpiLMI_Realmd.so
+%{_datadir}/%{name}/60_LMI_Realmd.mof
+%{_datadir}/%{name}/60_LMI_Realmd.reg
+
+%pre
+# If upgrading, deregister old version
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register --just-mofs unregister \
+ %{_datadir}/%{name}/30_LMI_Jobs.mof \
+ > /dev/null 2>&1 || :;
+fi
+
+%post
+/sbin/ldconfig
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register --just-mofs register \
+ %{_datadir}/%{name}/30_LMI_Jobs.mof \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun
+# Deregister only if not upgrading
+if [ "$1" -eq 0 ]; then
+ %{_bindir}/openlmi-mof-register --just-mofs unregister \
+ %{_datadir}/%{name}/30_LMI_Jobs.mof \
+ > /dev/null 2>&1 || :;
+fi
+
+%postun -p /sbin/ldconfig
+
+%pre -n openlmi-fan
+# If upgrading, deregister old version
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Fan.mof \
+ %{_datadir}/%{name}/60_LMI_Fan.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-powermanagement
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.mof \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-service
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Service.mof \
+ %{_datadir}/%{name}/60_LMI_Service.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-account
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Account.mof \
+ %{_datadir}/%{name}/60_LMI_Account.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-software
+if [ "$1" -gt 1 ]; then
+ # delete indication filters from sfcbd
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop \
+ -c sfcbd unregister \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+ # delete indication filters from tog-pegasus
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/PG_InterOp \
+ -c tog-pegasus unregister \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Software.mof \
+ %{_datadir}/%{name}/LMI_Software.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-logicalfile
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.mof \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%pre -n openlmi-realmd
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Realmd.mof \
+ %{_datadir}/%{name}/60_LMI_Realmd.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-fan
+# Register Schema and Provider
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Fan.mof \
+ %{_datadir}/%{name}/60_LMI_Fan.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-powermanagement
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.mof \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-service
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Service.mof \
+ %{_datadir}/%{name}/60_LMI_Service.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-account
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Account.mof \
+ %{_datadir}/%{name}/60_LMI_Account.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-software
+if [ "$1" -ge 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Software.mof \
+ %{_datadir}/%{name}/LMI_Software.reg \
+ > /dev/null 2>&1 || :;
+ # install indication filters for sfcbd
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop \
+ -c sfcbd register \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+ # install indication filters for tog-pegasus
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/PG_InterOp \
+ -c tog-pegasus register \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-logicalfile
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.mof \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%post -n openlmi-realmd
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register register \
+ %{_datadir}/%{name}/60_LMI_Realmd.mof \
+ %{_datadir}/%{name}/60_LMI_Realmd.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-fan
+# Deregister only if not upgrading
+if [ "$1" -eq 0 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Fan.mof \
+ %{_datadir}/%{name}/60_LMI_Fan.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-powermanagement
+if [ "$1" -eq 0 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.mof \
+ %{_datadir}/%{name}/60_LMI_PowerManagement.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-service
+if [ "$1" -eq 0 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Service.mof \
+ %{_datadir}/%{name}/60_LMI_Service.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-account
+if [ "$1" -eq 0 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Account.mof \
+ %{_datadir}/%{name}/60_LMI_Account.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-software
+if [ "$1" -eq 0 ]; then
+ # delete indication filters from sfcbd
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/interop \
+ -c sfcbd unregister \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+ # delete indication filters from tog-pegasus
+ %{_bindir}/openlmi-mof-register --just-mofs -n root/PG_InterOp \
+ -c tog-pegasus unregister \
+ %{_datadir}/%{name}/70_LMI_SoftwareIndicationFilters.mof \
+ > /dev/null 2>&1 || :;
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Software.mof \
+ %{_datadir}/%{name}/LMI_Software.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-logicalfile
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.mof \
+ %{_datadir}/%{name}/60_LMI_LogicalFile.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%preun -n openlmi-realmd
+if [ "$1" -gt 1 ]; then
+ %{_bindir}/openlmi-mof-register unregister \
+ %{_datadir}/%{name}/60_LMI_Realmd.mof \
+ %{_datadir}/%{name}/60_LMI_Realmd.reg \
+ > /dev/null 2>&1 || :;
+fi
+
+%changelog
+* Fri May 10 2013 Jan Safranek <jsafrane@redhat.com> 0.0.22-1
+- Create the spec file.
+