From d4fe6d72f4625d5e209aa69cb3c8b74a34281ad6fda4ea9eba26d60fb8e2641e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Mon, 29 Jul 2024 19:11:54 +0000 Subject: [PATCH] Normalize CPAN version See https://github.com/openSUSE/cpanspec/issues/47 for details OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-DelimMatch?expand=0&rev=19 --- cpanspec.yml | 35 ++++++++++++++++++++++++ perl-Text-DelimMatch.spec | 57 ++++++++++++++++++++++----------------- 2 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 cpanspec.yml diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..50f40d3 --- /dev/null +++ b/cpanspec.yml @@ -0,0 +1,35 @@ +--- +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: +# baz.patch: PATCH-FIX-OPENSUSE +#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: SUSE-NonFree +#skip_noarch: 1 +#custom_build: |- +#./Build build flags=%{?_smp_mflags} --myflag +#custom_test: |- +#startserver && make test +#ignore_requires: Bizarre::Module +#skip_doc: regexp_to_skip_for_doc.* +#add_doc: files to add to docs +#misc: |- +#anything else to be added to spec file +#follows directly after %files section, so it can contain new blocks or also +#changes to %files section diff --git a/perl-Text-DelimMatch.spec b/perl-Text-DelimMatch.spec index f45db71..0b66205 100644 --- a/perl-Text-DelimMatch.spec +++ b/perl-Text-DelimMatch.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Text-DelimMatch # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -12,35 +12,48 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%define cpan_name Text-DelimMatch Name: perl-Text-DelimMatch -%define module_name DelimMatch -%define module_version 1.06 -Summary: DelimMatch for Locating Delimited Substrings with Proper Nesting -License: Artistic-1.0 -Group: Development/Libraries/Perl -Version: 1.06 +Version: 1.60.0 Release: 0 -Source0: %{module_name}-1.06a.tar.gz -Url: http://search.cpan.org/~nwalsh/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} +# 1.06 -> normalize -> 1.60.0 +%define cpan_version 1.06a +License: Artistic-1.0 OR GPL-1.0-or-later +Summary: Perl extension to find regexp delimited strings with proper nesting +URL: https://metacpan.org/release/%{cpan_name} +Source0: https://cpan.metacpan.org/authors/id/N/NW/NWALSH/DelimMatch-%{cpan_version}.tar.gz +Source1: cpanspec.yml +BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros +Provides: perl(Text::DelimMatch) = %{version} +%undefine __perllib_provides +%{perl_requires} %description -DelimMatch is a Perl 5 module that provides functions for locating -delimited substrings with proper nesting. +These routines allow you to match delimited substrings in a buffer. The +delimiters can be specified with any regular expression and the start and +end delimiters need not be the same. If the delimited text is properly +nested, entire nested groups are returned. + +In addition, you may specify quoting and escaping characters that +contribute to the recognition of start and end delimiters. + +For example, if you specify the start and end delimiters as '\(' and '\)', +respectively, and the double quote character as a quoting character, and +the backslash as an escaping character, then the delimited substring in +this buffer is "(ma(t)c\)h)": %prep -%setup -q -n %{module_name}-%{module_version} +%autosetup -n %{cpan_name}-%{cpan_version} %build -CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL -make %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor +%make_build %check make test @@ -48,13 +61,9 @@ make test %install %perl_make_install %perl_process_packlist +%perl_gen_filelist -%files -%defattr(-, root, root) -%doc README -%doc %{_mandir}/man?/* -%{perl_vendorarch}/auto/Text -%{perl_vendorlib}/auto/Text -%{perl_vendorlib}/Text +%files -f %{name}.files +%doc README %changelog