File intelnvm-cim.spec of Package ixpdimm-cim
#
# spec file for package intelnvm-cim
#
# Copyright (c) 2016 Intel Corporation
# Copyright (c) 2016 SUSE LINUX 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/
#
%define rpm_name intelnvm-cim
%define build_version 1.0.0.1032
%define build_release 1
%define api_release 1
%define dname %{rpm_name}-devel
%define lname lib%{rpm_name}%{api_release}
%define srcname intelnvmcimlibrary
%define debug_package %{nil}
Name: %{rpm_name}
Version: %{build_version}
Release: 0
Summary: Framework for Intel Storage CIM Binaries
License: BSD-3-Clause and BSD-2-Clause
Group: System/Libraries
Url: http://www.intel.com
Source: https://github.com/01org/intelnvmcimlibrary/archive/v%{version}.tar.gz
# PATCH-FIX-SUSE point rpath to standard lib dir
Patch1: fix-build-on-non-ESX-Linux.patch
BuildRequires: distribution-release
BuildRequires: gcc-c++
ExclusiveArch: x86_64
%description
Framework libraries for the Intel Storage CIM binaries
%package -n %{lname}
Summary: Library for Intel Storage CIM binaries
Group: System/Libraries
%description -n %{lname}
Just the shared library for Intel Storage CIM binaries
%package -n %{dname}
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}-%{release}
%description -n %{dname}
The %{name}-devel package contains header files for
developing applications that use %{name}.
%prep
%setup -q -n %{srcname}-%{version}
%patch1 -p1
%build
# set ESX for sfcb cimom
BUILD_ESX=1 make BUILDNUM=%{version} RELEASE=1
%install
BUILD_ESX=1 make install BUILDNUM=%{version} RELEASE=1 RPM_ROOT=%{buildroot} LIB_DIR=%{_libdir} INCLUDE_DIR=%{_includedir}
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files -n %{lname}
%defattr(-,root,root)
%{_libdir}/lib%{rpm_name}.so.*
%files -n %{dname}
%defattr(-,root,root)
%{_libdir}/lib%{rpm_name}.so
%{_includedir}/lib%{rpm_name}
%changelog