File simdutf.spec of Package simdutf

#
# spec file for package simdutf
#
# Copyright (c) 2024 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  sover  26
Name:           simdutf
Version:        @SERVICE@
Release:        0
Summary:        Unicode validation and transcoding at billions of characters per second
License:        Apache-2.0 AND MIT
Group:          Development/Languages/C and C++
URL:            https://github.com/simdutf/simdutf
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.15
BuildRequires:  gcc-c++

%description
Unicode (UTF8, UTF16, UTF32) validation and transcoding at billions of 
characters per second using SSE2, AVX2, NEON, AVX-512.

%prep
%autosetup

%package -n     lib%{name}%{sover}
Summary:        Unicode validation and transcoding at billions of characters per second
Group:          System/Libraries

%description -n lib%{name}%{sover}
Unicode (UTF8, UTF16, UTF32) validation and transcoding at billions of
characters per second using SSE2, AVX2, NEON, AVX-512.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Languages/C and C++
Requires:       lib%{name}%{sover} = %{version}-%{release}

%description    devel
The package contains libraries and header files for developing applications
that use %{name}.

%package        tools
Summary:        Convert text from one character encoding to another
Group:          Productivity/Text/Convertors

%description    tools
Convert encoding of input files from one encoding to another using simdutf
library for supported formats and iconv for other formats.

%build
%cmake
%cmake_build

%install
%cmake_install

%check
%ctest

%ldconfig_scriptlets -n lib%{name}%{sover}

%files -n lib%{name}%{sover}
%doc AUTHORS README.md
%{_libdir}/lib%{name}.so.*
%license LICENSE-APACHE LICENSE-MIT

%if 0%{?suse_version} >= 1600
%files tools
%{_bindir}/fastbase64
%{_bindir}/sutf
%endif

%files devel
%{_includedir}/%{name}.h
%{_includedir}/%{name}
%{_libdir}/cmake/%{name}
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%changelog
openSUSE Build Service is sponsored by