File libstorage-ng.spec of Package libstorage-ng.15663

# spec file for package libstorage-ng
# Copyright (c) 2017 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

%define libname %{name}1
Name:           libstorage-ng
Version:        4.2.76
Release:        0
Summary:        Library for storage management
License:        GPL-2.0-only
Group:          System/Libraries
Source:         %{name}-%{version}.tar.xz
%if 0%{?suse_version} >= 1330
BuildRequires:  libboost_headers-devel
BuildRequires:  libboost_test-devel
BuildRequires:  boost-devel
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  graphviz
BuildRequires:  grep
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  ruby
BuildRequires:  ruby-devel
%if 0%{?suse_version} == 1315
# Using rubygem(test-unit) does not work since ruby2.1-stdlib claims to
# provide rubygem(test-unit). But that is plain wrong. The version in
# ruby2.1-stdlib does not provide the function assert_raise_kind_of.
BuildRequires:  ruby2.1-rubygem-test-unit
%if 0%{?fedora}
BuildRequires:  rubygem-test-unit
BuildRequires:  swig >= 3.0.3
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  libjson-c-devel
BuildRequires:  pkgconfig(python3)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package contains libstorage-ng, a library for storage management.

%package lang
Summary:        Languages for package %{name}
Group:          System/Localization
Supplements:    %{name}
Provides:       %{name}-lang-all = %{version}
BuildArch:      noarch

%description lang
Provides translations to the package %{name}

%package -n %{libname}
Summary:        Library for storage management
Group:          System/Libraries
Recommends:     %{name}-lang
Requires:       coreutils
Suggests:       cryptsetup
Requires:       device-mapper
Suggests:       dmraid
Requires:       lsscsi >= 0.26
Suggests:       lvm2
Suggests:       mdadm >= 3.3
Suggests:       multipath-tools
Requires:       parted >= 3.2
Requires:       pkgconfig
Requires:       util-linux >= 2.16
Requires:       pkgconfig(udev)
Obsoletes:      %{libname} < %{version}
Obsoletes:      libstorage %(echo `seq -s " " -f "libstorage%.f" 9`)
%ifarch s390 s390x
Requires:       s390-tools
# Old version of libdmraid cannot be used. Upgrading from SLE11 to SLE15
# does not remove old version, so it needs to be marked as conflict.
# For more info, see

%description -n %{libname}
This package contains libstorage-ng, a library for storage management.

%package devel
Summary:        Header files and documentation for libstorage-ng
Group:          Development/Languages/C and C++
Requires:       %{libname} = %{version}
Requires:       gcc-c++
Requires:       libstdc++-devel
Requires:       pkgconfig
Requires:       pkgconfig(libxml-2.0)

%description devel
This package contains header files and documentation for developing with

%package python3
Summary:        Python bindings for libstorage-ng
Group:          System/Libraries
Requires:       %{libname} = %{version}
Obsoletes:      libstorage-python

%description python3
This package contains Python bindings for libstorage-ng.

%package ruby
Summary:        Ruby bindings for libstorage-ng
Group:          System/Libraries
Requires:       %{libname} = %{version}
Obsoletes:      libstorage-ruby

%description ruby
This package contains Ruby bindings for libstorage-ng.

%package utils
Summary:	Utils for libstorage-ng
Group:		Development/Tools/Other
Recommends:	graphviz
Recommends:	ImageMagick

%description utils
This package contains utils for libstorage-ng.

%package integration-tests
Summary:        Integration tests for libstorage-ng
Group:          Development/Tools/Other
Requires:       libstorage-ng-python3

%description integration-tests
This package contains integration tests for libstorage-ng.

%setup -q

export CFLAGS="%{optflags} -DNDEBUG"
export CXXFLAGS="%{optflags} -DNDEBUG"

autoreconf -fvi

%configure \
   --disable-static \
make %{?_smp_mflags}

make %{?_smp_mflags} check VERBOSE=1 LOCALEDIR=%{buildroot}%{_datadir}/locale

find %{buildroot} -type f -name "*.la" -delete -print
find %{buildroot} -type f -name "*.pyc" -delete -print

install -d -m 755 %{buildroot}/run/libstorage-ng
touch %{buildroot}/run/libstorage-ng/lock

%fdupes -s %{buildroot}

%find_lang libstorage-ng

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files -n %{name}-lang -f libstorage-ng.lang

%files -n %{libname}
%license LICENSE
%ghost /run/libstorage-ng

%files devel
%dir %{_docdir}/%{name}/
%doc %{_docdir}/%{name}/*

%files python3
%attr(755,root,root) %{python3_sitearch}/

%files ruby

%files utils
%dir %{_libexecdir}/libstorage-ng

%files integration-tests
%dir %{_libexecdir}/libstorage-ng

openSUSE Build Service is sponsored by