2013-03-21 12:58:32 +00:00
|
|
|
#
|
2013-04-09 14:05:18 +00:00
|
|
|
# spec file for package cmpi-ruby-base (Version 0.1.0)
|
2013-03-21 12:58:32 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2013 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 http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
Name: cmpi-ruby-base
|
|
|
|
Url: http://en.opensuse.org/Software_Management/CIM
|
|
|
|
License: LGPL-2.1
|
|
|
|
Group: System/Management
|
|
|
|
AutoReqProv: on
|
2013-04-11 15:08:57 +00:00
|
|
|
Version: 0.2.1
|
2013-03-21 12:58:32 +00:00
|
|
|
Release: 2
|
|
|
|
Summary: Base CMPI CIM providers
|
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
Requires: cmpi-bindings-ruby
|
2013-04-02 20:37:01 +00:00
|
|
|
Requires: sblim-sfcb
|
|
|
|
PreReq: sblim-sfcb
|
2013-03-21 12:58:32 +00:00
|
|
|
BuildRequires: sblim-sfcb
|
2013-04-02 20:37:01 +00:00
|
|
|
BuildRequires: ruby
|
2013-07-26 09:11:30 +00:00
|
|
|
%if 0%{?suse_version} < 1120
|
|
|
|
BuildRequires: rubygem-rake
|
|
|
|
%endif
|
2013-04-02 20:37:01 +00:00
|
|
|
BuildRequires: rubygem(provider-testing)
|
|
|
|
BuildRequires: rubygem(cim)
|
2013-03-21 12:58:32 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
%define mofdir /usr/share/mof/%{name}
|
|
|
|
%define cmpidir /usr/share/cmpi
|
2013-04-02 20:37:01 +00:00
|
|
|
%define namespace root/suse
|
2013-03-21 12:58:32 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Set of CIM providers modeling base CIs of a Linux system
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n %{name}
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2013-04-02 20:37:01 +00:00
|
|
|
rake install DESTDIR=%{buildroot}
|
|
|
|
|
2013-03-21 12:58:32 +00:00
|
|
|
%pre
|
|
|
|
if [ $1 -gt 1 ]; then
|
2013-04-02 20:37:01 +00:00
|
|
|
if [ -d %{mofdir} ]; then
|
|
|
|
for i in %{mofdir}/*.reg
|
|
|
|
do
|
|
|
|
j=`basename $i`
|
|
|
|
sfcbunstage -n %{namespace} -r $j `basename $j .reg`.mof
|
|
|
|
done
|
|
|
|
fi
|
2013-03-21 12:58:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%post
|
2013-04-02 20:37:01 +00:00
|
|
|
for i in %{mofdir}/*.reg
|
|
|
|
do
|
|
|
|
sfcbstage -n %{namespace} -r $i %{mofdir}/`basename $i .reg`.mof
|
|
|
|
done
|
|
|
|
sfcbrepos -f
|
2013-03-21 12:58:32 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ "$1" = "0" ] ; then
|
2013-04-02 20:37:01 +00:00
|
|
|
if [ -d %{mofdir} ]; then
|
|
|
|
for i in %{mofdir}/*.reg
|
|
|
|
do
|
|
|
|
j=`basename $i`
|
|
|
|
sfcbunstage -n %{namespace} -r $j `basename $j .reg`.mof
|
|
|
|
done
|
|
|
|
sfcbrepos -f
|
|
|
|
fi
|
|
|
|
fi
|
2013-03-21 12:58:32 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{cmpidir}
|
|
|
|
%{cmpidir}
|
|
|
|
%dir %{mofdir}
|
|
|
|
%{mofdir}
|
|
|
|
|
|
|
|
%changelog
|