diff --git a/String-Approx-3.27.tar.gz b/String-Approx-3.27.tar.gz deleted file mode 100644 index 93013d0..0000000 --- a/String-Approx-3.27.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b8c1acd24fa9681ebba0ccb3c49f16289de1d579af8a0c898ea8f8d1baf5d36 -size 45497 diff --git a/String-Approx-3.28.tar.gz b/String-Approx-3.28.tar.gz new file mode 100644 index 0000000..b284014 --- /dev/null +++ b/String-Approx-3.28.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43201e762d8699cb0ac2c0764a5454bdc2306c0771014d6c8fba821480631342 +size 45093 diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..701ac12 --- /dev/null +++ b/cpanspec.yml @@ -0,0 +1,28 @@ +--- +#description_paragraphs: 3 +#description: |- +# override description from CPAN +#summary: override summary from CPAN +#no_testing: broken upstream +#sources: +# - source1 +# - source2 +#patches: +# foo.patch: -p1 +# bar.patch: +#preamble: |- +# BuildRequires: gcc-c++ +#post_prep: |- +# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` +# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL +#post_build: |- +# rm unused.files +#post_install: |- +# sed on %{name}.files +license: LGPL-2.0 OR Artistic-2.0 +#skip_noarch: 1 +#custom_build: |- +#./Build build flags=%{?_smp_mflags} --myflag +#custom_test: |- +#startserver && make test +#ignore_requires: Bizarre::Module diff --git a/perl-String-Approx.changes b/perl-String-Approx.changes index c73b4d1..0f384bd 100644 --- a/perl-String-Approx.changes +++ b/perl-String-Approx.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Apr 17 06:36:07 UTC 2017 - coolo@suse.com + +- updated to 3.28 + see /usr/share/doc/packages/perl-String-Approx/ChangeLog + + 2017-04-16 Jarkko Hietaniemi + + * Resolve https://rt.cpan.org/Public/Bug/Display.html?id=121033 + Fails tests with no '.' in @INC + + * Released as 3.28. + ------------------------------------------------------------------- Tue Mar 26 15:38:16 UTC 2013 - pgajdos@suse.com diff --git a/perl-String-Approx.spec b/perl-String-Approx.spec index 4bb606b..c636f21 100644 --- a/perl-String-Approx.spec +++ b/perl-String-Approx.spec @@ -1,7 +1,7 @@ # # spec file for package perl-String-Approx # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,37 +17,74 @@ Name: perl-String-Approx +Version: 3.28 +Release: 0 %define cpan_name String-Approx Summary: Perl extension for approximate matching (fuzzy matching) -License: Artistic-1.0 or GPL-2.0+ +License: LGPL-2.0 OR Artistic-2.0 Group: Development/Libraries/Perl -Version: 3.27 -Release: 0 -Url: http://search.cpan.org/dist/String-Approx -Source0: %{cpan_name}-%{version}.tar.gz +Url: http://search.cpan.org/dist/String-Approx/ +Source0: https://cpan.metacpan.org/authors/id/J/JH/JHI/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Test::More) -Requires: perl(Test::More) +%{perl_requires} %description -String::Approx lets you match and substitute strings approximately. -With this you can emulate errors: typing errorrs, speling errors, -closely related vocabularies (colour color), -genetic mutations (GAG ACT), abbreviations (McScot, MacScot). +String::Approx lets you match and substitute strings approximately. With +this you can emulate errors: typing errorrs, speling errors, closely +related vocabularies (colour color), genetic mutations (GAG ACT), +abbreviations (McScot, MacScot). -NOTE: String::Approx suits the task of string matching, -not string comparison, and it works for strings, not for text. +NOTE: String::Approx suits the task of *string matching*, not *string +comparison*, and it works for *strings*, not for *text*. - Authors: Jarkko Hietaniemi +If you want to compare strings for similarity, you probably just want the +Levenshtein edit distance (explained below), the Text::Levenshtein and +Text::LevenshteinXS modules in CPAN. See also Text::WagnerFischer and +Text::PhraseDistance. (There are functions for this in String::Approx, e.g. +adist(), but their results sometimes differ from the bare Levenshtein et +al.) + +If you want to compare things like text or source code, consisting of +*words* or *tokens* and *phrases* and *sentences*, or *expressions* and +*statements*, you should probably use some other tool than String::Approx, +like for example the standard UNIX diff(1) tool, or the Algorithm::Diff +module from CPAN. + +The measure of *approximateness* is the _Levenshtein edit distance_. It is +the total number of "edits": insertions, + + word world + +deletions, + + monkey money + +and substitutions + + sun fun + +required to transform a string to another string. For example, to transform +_"lead"_ into _"gold"_, you need three edits: + + lead gead goad gold + +The edit distance of "lead" and "gold" is therefore three, or 75%. + +*String::Approx* uses the Levenshtein edit distance as its measure, but +String::Approx is not well-suited for comparing strings of different +length, in other words, if you want a "fuzzy eq", see above. String::Approx +is more like regular expressions or index(), it finds substrings that are +close matches.> %prep %setup -q -n %{cpan_name}-%{version} +find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build -CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__make} %{?_smp_mflags} %check @@ -58,11 +95,9 @@ CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL %perl_process_packlist %perl_gen_filelist -%clean -%{__rm} -rf %{buildroot} - %files -f %{name}.files -%defattr(-,root,root) -%doc Artistic ChangeLog README +%defattr(-,root,root,755) +%doc ChangeLog COPYRIGHT COPYRIGHT.agrep LGPL PROBLEMS README README.apse +%license Artistic %changelog