2008-01-09 04:28:16 +01:00
#
2011-09-15 11:58:47 +02:00
# spec file for package cim-schema
2008-01-09 04:28:16 +01:00
#
2022-07-01 17:54:38 +02:00
# Copyright (c) 2022 SUSE LLC
2008-01-09 04:28:16 +01:00
#
2008-09-04 23:29:49 +02:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2020-08-15 18:53:44 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2008-01-09 04:28:16 +01:00
#
2008-05-17 21:39:10 +02:00
Name : cim-schema
2022-07-01 17:54:38 +02:00
Version : 2.54.0
2015-06-22 14:42:25 +02:00
Release : 0
2008-01-09 04:28:16 +01:00
Summary : Common Information Model (CIM) Schema
2012-02-17 15:34:47 +01:00
License : SUSE-DMTF
2012-02-08 12:54:51 +01:00
Group : System/Management
2020-08-15 18:53:44 +02:00
URL : http://www.dmtf.org/
Source0 : http://www.dmtf.org/sites/default/files/cim/cim_schema_v2530/cim_schema_%{version} Experimental-MOFs.zip
2008-01-09 04:28:16 +01:00
Source1 : loadmof.sh
Source2 : rmmof.sh
2015-06-22 14:42:25 +02:00
BuildRequires : unzip
2013-06-28 09:15:14 +02:00
# openlmi-* requires the experimental variant
Provides : cim-schema-experimental = %{version}
2015-06-22 14:42:25 +02:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
BuildArch : noarch
2008-01-09 04:28:16 +01:00
%description
Common Information Model (CIM) is a model for describing overall
management information in a network or enterprise environment. CIM
consists of a specification and a schema. The specification defines the
details for integration with other management models. The schema
provides the actual model descriptions.
%prep
2015-06-22 14:42:25 +02:00
%setup -q -c
2008-01-09 04:28:16 +01:00
%build
%install
2015-06-22 14:42:25 +02:00
MOFDIR=%{_datadir} /mof
2008-01-09 04:28:16 +01:00
CIMDIR=$MOFDIR/cimv%{version}
2008-01-09 21:54:15 +01:00
for i in `find . -name " * . m o f " `; do
perl -p -i -e 's/\r//g' $i
done
2015-06-22 14:42:25 +02:00
install -d %{buildroot} /$CIMDIR
2008-09-04 23:29:49 +02:00
perl -p -i -e 's/\\/\//g' cim*.mof
2008-01-09 04:28:16 +01:00
echo " " >> qualifiers.mof
echo " / / O p t i o n a l Q u a l i f i e r s : " >> qualifiers.mof
echo " " >> qualifiers.mof
cat qualifiers_optional.mof >> qualifiers.mof
2015-06-22 14:42:25 +02:00
rm qualifiers_optional.mof
2008-01-09 04:28:16 +01:00
chmod -R go-wx .
chmod -R a+rX .
2015-06-22 14:42:25 +02:00
mv * %{buildroot} /$CIMDIR/
ln -s cimv%{version} %{buildroot} /$MOFDIR/cim-current
pushd %{buildroot} /$CIMDIR/
2008-09-04 23:29:49 +02:00
ln -s cim*.mof CIM_Schema.mof
popd
2015-06-22 14:42:25 +02:00
install -d %{buildroot} %{_prefix} /bin
install -m 755 %{SOURCE1} %{buildroot} %{_bindir} /
install -m 755 %{SOURCE2} %{buildroot} %{_bindir} /
perl -p -i -e 's~^#pragma include ("qualifiers_optional\.mof")~\/\/#pragma include ("qualifiers_optional\.mof")~g' %{buildroot} /$MOFDIR/cim-current/CIM_Schema.mof
2008-01-09 04:28:16 +01:00
perl -p -i -e \
's~^#pragma include \("qualifiers_optional\.mof"\)~\/\/#pragma include ("qualifiers_optional\.mof")~g' \
2015-06-22 14:42:25 +02:00
%{buildroot} /$MOFDIR/cim-current/CIM_Schema.mof
2008-01-09 04:28:16 +01:00
%files
%defattr (-, root, root)
2015-06-22 14:42:25 +02:00
%dir %{_datadir} /mof
%dir %{_datadir} /mof/cimv%{version}
%{_datadir} /mof/cimv%{version} /*
%{_datadir} /mof/cim-current
%{_bindir} /loadmof.sh
%{_bindir} /rmmof.sh
2008-01-09 04:28:16 +01:00
%changelog