Name: perl-String-Similarity
Version: 1.04
Release: 1
Summary: Calculates the similarity of two strings
License: GPL-2.0-or-later
URL: https://metacpan.org/release/String-Similarity
Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/String-Similarity-%{version}.tar.gz
BuildRequires: make
BuildRequires: gcc
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
%{?perl_default_filter}
%description
The similarity function calculates the similarity index of its two arguments.
A value of 0 means that the strings are entirely different. A value of 1
means that the strings are identical. Everything else lies between 0 and 1
and describes the amount of similarity between the strings.
%prep
%setup -q -n String-Similarity-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
%files
%doc Changes COPYING README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/String*
%{_mandir}/man3/*
%changelog
* Fri Mar 29 2024 Zengliwen <zengliwen@kylinos.cn> - 1.04-1
- Package Init