File cim-schema.spec of Package cim-schema

# spec file for package cim-schema
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

BuildRequires:  unzip

Name:           cim-schema
Summary:        Common Information Model (CIM) Schema
License:        SUSE-DMTF
Group:          System/Management
Version:        2.40.0
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
# openlmi-* requires the experimental variant
Provides:       cim-schema-experimental = %{version}

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.

%setup -c -n %{name}-%{version}


for i in `find . -name "*.mof"`; do
  perl -p -i -e 's/\r//g' $i
perl -p -i -e 's/\\/\//g' cim*.mof
echo "" >> qualifiers.mof
echo "// Optional Qualifiers: " >> qualifiers.mof
echo "" >> qualifiers.mof
cat qualifiers_optional.mof >> qualifiers.mof
%__rm qualifiers_optional.mof
chmod -R go-wx .
chmod -R a+rX .
ln -s cimv%{version} $RPM_BUILD_ROOT/$MOFDIR/cim-current
ln -s cim*.mof CIM_Schema.mof
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' \

%defattr(-, root, root)
%dir /usr/share/mof
%dir /usr/share/mof/cimv%{version}

openSUSE Build Service is sponsored by