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
#
2011-09-15 11:58:47 +02:00
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
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.
2008-01-09 04:28:16 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2008-01-09 21:54:15 +01:00
BuildRequires : unzip
2008-05-17 21:39:10 +02:00
Name : cim-schema
2008-01-09 21:54:15 +01:00
Url : http://www.dmtf.org/
2008-01-09 04:28:16 +01:00
Summary : Common Information Model (CIM) Schema
2011-10-20 12:42:34 +02:00
Version : 2.30.0
2011-09-15 14:20:37 +02:00
Release : 1
2008-01-09 04:28:16 +01:00
Group : System/Management
2011-09-15 11:58:41 +02:00
License : Reproducable (c) 1998-2010 DMTF
2008-01-09 04:28:16 +01:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2011-09-23 09:05:54 +02:00
Source0 : http://www.dmtf.org/sites/default/files/cim/cim_schema_v2291/cim_schema_%{version} Final-MOFs.zip
2008-01-09 04:28:16 +01:00
Source1 : loadmof.sh
Source2 : rmmof.sh
2008-01-09 21:54:15 +01:00
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
%setup -c -n %{name} -%{version}
%build
%install
MOFDIR=/usr/share/mof
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
2008-01-09 04:28:16 +01:00
install -d $RPM_BUILD_ROOT /$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
%__rm qualifiers_optional.mof
chmod -R go-wx .
chmod -R a+rX .
%__mv * $RPM_BUILD_ROOT /$CIMDIR/
ln -s cimv%{version} $RPM_BUILD_ROOT /$MOFDIR/cim-current
2008-09-04 23:29:49 +02:00
pushd $RPM_BUILD_ROOT /$CIMDIR/
ln -s cim*.mof CIM_Schema.mof
popd
2008-01-09 04:28:16 +01:00
install -d $RPM_BUILD_ROOT /usr/bin
install -m 755 %{S:1} $RPM_BUILD_ROOT /usr/bin/
install -m 755 %{S:2} $RPM_BUILD_ROOT /usr/bin/
perl -p -i -e 's~^#pragma include ("qualifiers_optional\.mof")~\/\/#pragma include ("qualifiers_optional\.mof")~g' $RPM_BUILD_ROOT /$MOFDIR/cim-current/CIM_Schema.mof
perl -p -i -e \
's~^#pragma include \("qualifiers_optional\.mof"\)~\/\/#pragma include ("qualifiers_optional\.mof")~g' \
$RPM_BUILD_ROOT /$MOFDIR/cim-current/CIM_Schema.mof
%files
%defattr (-, root, root)
%dir /usr/share/mof
%dir /usr/share/mof/cimv%{version}
/usr/share/mof/cimv%{version} /*
/usr/share/mof/cim-current
/usr/bin/loadmof.sh
/usr/bin/rmmof.sh
%changelog