File rapidfuzz-cpp.spec of Package rapidfuzz-cpp

#
# spec file for package rapidfuzz-cpp
#
# Copyright (c) 2023 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 libname rapidfuzz
Name:           rapidfuzz-cpp
Version:        2.2.3
Release:        0
Summary:        Rapid fuzzy string matching in C++ using the Levenshtein Distance
License:        MIT
Group:          Development/Libraries/C and C++
URL:            https://github.com/maxbachmann/rapidfuzz-cpp
Source0:        https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++

%description
RapidFuzz is a fast string matching library for Python and C++, which is using
the string similarity calculations from FuzzyWuzzy. However there are two
aspects that set RapidFuzz apart from FuzzyWuzzy:
 - It is MIT licensed so it can be used whichever License you might want to
   choose for your project, while you're forced to adopt the GPL license when
   using FuzzyWuzzy
 - It is mostly written in C++ and on top of this comes with a lot of
   Algorithmic improvements to make string matching even faster, while still
   providing the same results.

%package -n %{libname}-devel
Summary:        Rapid fuzzy string matching in C++ using the Levenshtein Distance
Group:          Development/Libraries/C and C++

%description -n %{libname}-devel
RapidFuzz is a fast string matching library for Python and C++, which is using
the string similarity calculations from FuzzyWuzzy. However there are two
aspects that set RapidFuzz apart from FuzzyWuzzy:
 - It is MIT licensed so it can be used whichever License you might want to
   choose for your project, while you're forced to adopt the GPL license when
   using FuzzyWuzzy
 - It is mostly written in C++ and on top of this comes with a lot of
   Algorithmic improvements to make string matching even faster, while still
   providing the same results.

%prep
%autosetup -p1

%build
%cmake
%cmake_build

%install
%cmake_install
%fdupes %{buildroot}

%files -n %{libname}-devel
%license LICENSE
%doc README.md
%{_includedir}/%{libname}
%dir %{_libdir}/cmake/%{libname}
%{_libdir}/cmake/%{libname}/%{libname}Config.cmake
%{_libdir}/cmake/%{libname}/%{libname}ConfigVersion.cmake
%{_libdir}/cmake/%{libname}/%{libname}Targets.cmake

%changelog
openSUSE Build Service is sponsored by