File libopendrim0.spec of Package libopendrim0

#################################################################################
# Note: This Copyright statement covers the OpenDRIM original parts of this file.
# It does NOT concern the parts generated by automake.
# 
# Linux Management Providers (LMP), Provider Common Library
# Copyright (C) 2008 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr, guillaumebottex@gmail.com>
# 
# This program is being developed under the "OpenDRIM" project.
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#################################################################################

#################################################################################
# To contributors, please leave your contact information in this section
# AND comment your changes in the source code.
# 
# Modified by <Author(s)>, <Affiliation>, <Year>
#################################################################################

# norootforbuild

%define packageVersion 1
Version: 1.1.4
Release: %{packageVersion}%{?dist}

Vendor:    OpenDRIM
Summary:   OpenDRIM Providers Common Library
%define srcname libopendrim
Name:      %{srcname}0
Group:     System/Management
License:   GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL:       http://opendrim.sourceforge.net

Source:    %{srcname}-%{version}.tar.bz2
Patch0:    %{srcname}.patch
Patch1:    gcc-4.7.patch

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cmpi-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
%if 0%{?suse_version} > 1010
BuildRequires:  fdupes
%endif


Requires: cim-server, coreutils, net-tools, util-linux
Provides: libopendrim-smbios

%description
-

%package devel
Group:     Development/Libraries/C and C++
Requires:  %{name}
License:   GPL
Summary:   OpenDRIM Providers Common Library Development
%description devel
-



%global COMMONLIBDIR $RPM_BUILD_ROOT/usr/%{_lib}
%global OPENDRIMCOMMONINCLUDE $RPM_BUILD_ROOT/usr/include/OpenDRIM


%prep
%setup -q -n %{srcname}-%{version}
%patch -P0 -p1
%patch -P1 -p1

%build
autoreconf --install --force
# FIXME: autodetect cimserver
%configure CIMSERVER=sfcb COMMONLIBDIR=/usr/%{_lib}
make 

%install
%{__rm} -rf %{buildroot}
make install DESTDIR=$RPM_BUILD_ROOT
%{__install} -d $RPM_BUILD_ROOT/var/lib/OpenDRIM
%{__rm} -rf %{buildroot}/usr/%{_lib}/*a
%{__rm} -rf %{buildroot}/usr/include/OpenDRIM/cmpi

#%{__install} -d %COMMONLIBDIR %OPENDRIMCOMMONINCLUDE/cmpi $RPM_BUILD_ROOT/var/lib/OpenDRIM
#%{__install} -m 644 Association.h CMPIBroking.h Common.h Datastore.h Indication.h Instance.h Objectpath.h Transtype.h EmbeddedInstance.h net_dev.h SMBIOS.h %OPENDRIMCOMMONINCLUDE
#%{__install} -m 644 cmpi/* %OPENDRIMCOMMONINCLUDE/cmpi/
#%{__install} -m 755 -s .libs/%{srcname}*.so* %COMMONLIBDIR

%if 0%{?suse_version} > 1010
%fdupes $RPM_BUILD_ROOT
%endif

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT;
[ "${RPM_BUILD_DIR}" != "/" ] && %{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version};

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root, 755)
%attr(755,root,root) %{_libdir}/%{srcname}.so.*
%dir /var/lib/OpenDRIM

%files devel
%defattr(-, root, root, 755)
%attr(755,root,root) %{_libdir}/%{srcname}.so
%dir /usr/include/OpenDRIM
%attr(644,root,root) /usr/include/OpenDRIM/*.h

%changelog
openSUSE Build Service is sponsored by