File boost-nowide.spec of Package boost-nowide
#
# spec file for package boost-nowide
#
# Copyright (c) 2020 SUSE LLC
#
# 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 library_version 11_1_2
Name:          boost-nowide
Version:       11.1.2
Release:       0
Summary:       Boost.Nowide Unicode helper
License:       BSL-1.0
Group:         Development/Libraries/C and C++
Url:           https://github.com/boostorg/nowide
Source:        https://github.com/boostorg/nowide/archive/refs/tags/v%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: boost-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_chrono-devel
%package devel
Summary:  Boost.Nowide header files
Group:    Development/Libraries/C and C++
Requires: libboost_nowide%{library_version} == %{version}-%{release}
# nowide is a header only library on linux
Provides: boost-nowide-static = %{version}-%{release}
Requires: boost-devel
%description
Boost.Nowide is a library implemented by Artyom Beilis
that makes cross platform Unicode aware programming
easier.
The library provides an implementation of standard C and C++ library
functions, such that their inputs are UTF-8 aware on Windows without
requiring to use Wide API.
%description devel
Development files for building against boost-nowide
%package     -n libboost_nowide%{library_version}
Summary:        Boost.Nowide runtime library
Group:          System/Libraries
Requires:       boost-license
%description -n libboost_nowide%{library_version}
Run-Time support for Boost.Nowide, a library implemented by Artyom Beilis
that makes cross platform Unicode aware programming easier.
%prep
%setup -q -n nowide-%{version}
%build
%cmake -DNOWIDE_SYSTEM_INCLUDE=ON
%cmake_build
%install
%cmake_install
%post -n libboost_nowide%{library_version} -p /sbin/ldconfig
%postun -n libboost_nowide%{library_version} -p /sbin/ldconfig
%files -n libboost_nowide%{library_version}
%{_libdir}/libboost_nowide.so.%{version}
%files devel
%{_includedir}/boost/nowide
%dir %{_prefix}/lib/cmake/
%{_prefix}/lib/cmake/boost_nowide
%{_libdir}/libboost_nowide.so
%changelog