File invm-cli.spec of Package invm-cli

#
# spec file for package invm-cli
#
# 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 oname invm-cli
%define build_version 1.0.0.1102
%define api_release 1
%define lname lib%{oname}%{api_release}
%define dname %{oname}-devel
%define srcname lib%{name}-%{build_version}

Name:           %{oname}
Version:        %{build_version}
Release:        0
Summary:        Framework for Intel Storage CLI Binaries
License:        BSD-3-Clause
Group:          System/Libraries
URL:            https://01.org/intel-nvm-cli-library
Source:         https://github.com/01org/lib%{oname}/archive/v%{build_version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  invm-i18n-devel
Requires:       libinvm-i18n%{api_release} >= 1.0.0.1015
ExclusiveArch:  x86_64

%description
Framework libraries for the Intel Storage CLI binaries.

%package -n %{lname}
Summary:        Framework for Intel Storage CLI Binaries
Group:          System/Libraries

%description -n %{lname}
Framework libraries for the Intel Storage CLI 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}
# Remember, remember the 5th^W^W bsc#976448
grep -lr CONFIDENTIAL . && exit 1

%build
make BUILDNUM=%{build_version} RELEASE=1 \
  CFLAGS_EXTERNAL="%{?optflags}" %{?_smp_mflags} 

%install
make BUILDNUM=%{build_version} RELEASE=1 \
  RPM_ROOT=%{buildroot} LIB_DIR=%{_libdir} INCLUDE_DIR=%{_includedir} \
  install

%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig

%files -n %{lname}
%defattr(-,root,root)
%{_libdir}/lib%{oname}.so.*
%doc LICENSE

%files -n %{dname}
%defattr(-,root,root)
%{_libdir}/lib%{oname}.so
%dir %{_includedir}/lib%{oname}
%attr(644,root,root) %{_includedir}/lib%{oname}/*.h

%changelog
openSUSE Build Service is sponsored by