File libc++utilities.spec of Package c++utilities
#
# spec file for package libc++utilities
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 Marius Kittler <marius.kittler@suse.com>
#
# 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 https://bugs.opensuse.org/
#
%define reponame c++utilities
%define soname 4
Name: lib%{reponame}
Version: 4.16.0
Release: 0
Summary: Common C++ classes and routines
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/Martchus/cpp-utilities
Source: https://github.com/Martchus/cpp-utilities/archive/v%{version}/cpp-utilities-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix_ppc64be_tests.patch
Patch0: fix_ppc64be_tests.patch
BuildRequires: cmake
BuildRequires: cppunit-devel
BuildRequires: gcc-c++ >= 5
BuildRequires: pkgconfig
%description
Common C++ classes and routines such as argument parser, IO and conversion utilities.
%package -n lib%{reponame}%{soname}
Summary: Common C++ classes and routines
Group: System/Libraries
%description -n lib%{reponame}%{soname}
Common C++ classes and routines such as argument parser, IO and conversion utilities.
%package devel
Summary: Devel files for %{reponame}
Group: Development/Libraries/C and C++
Requires: cmake
Requires: glibc-devel
Requires: lib%{reponame}%{soname} = %{version}
Requires: libstdc++-devel
Requires: pkgconfig
%description devel
Development files for %{reponame}
%prep
%setup -q -n cpp-utilities-%{version}
%patch0 -p1
%build
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX:STRING=%{_prefix} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DLIB_SUFFIX_64:STRING="64" \
..
make %{?_smp_mflags}
%check
cd build
make check %{?_smp_mflags}
%install
cd build
%make_install
%post -n lib%{reponame}%{soname}
ldconfig
%postun -n lib%{reponame}%{soname}
ldconfig
%files -n lib%{reponame}%{soname}
%license LICENSE
%{_libdir}/lib%{reponame}.so.%{soname}*
%files devel
%doc README.md
%{_includedir}/%{reponame}
%{_datadir}/%{reponame}
%{_libdir}/pkgconfig/%{reponame}.pc
%{_libdir}/lib%{reponame}.so
%changelog