From af351fb1a0b0ce9e5fb89820a38619c3af7af27afc0126fd8149cd508e16cb6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Thu, 8 Aug 2024 19:37:49 +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-Data-Dmp?expand=0&rev=5 --- perl-Data-Dmp.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/perl-Data-Dmp.spec b/perl-Data-Dmp.spec index ac1d913..cebd9bd 100644 --- a/perl-Data-Dmp.spec +++ b/perl-Data-Dmp.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Data-Dmp # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -18,12 +18,14 @@ %define cpan_name Data-Dmp Name: perl-Data-Dmp -Version: 0.242 +Version: 0.242.0 Release: 0 +# 0.242 -> normalize -> 0.242.0 +%define cpan_version 0.242 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Dump Perl data structures as Perl code URL: https://metacpan.org/release/%{cpan_name} -Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{version}.tar.gz +Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRequires: perl @@ -31,6 +33,8 @@ BuildRequires: perl-macros BuildRequires: perl(Regexp::Stringify) BuildRequires: perl(Test::More) >= 0.98 Requires: perl(Regexp::Stringify) +Provides: perl(Data::Dmp) = %{version} +%undefine __perllib_provides %{perl_requires} %description @@ -46,8 +50,9 @@ that I don't need, particularly the pretty formatting stuffs) and added some features that I need like proper regex dumping and coderef deparsing. %prep -%autosetup -n %{cpan_name}-%{version} -find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 +%autosetup -n %{cpan_name}-%{cpan_version} + +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor