From c2261b6be686638dd4fcfa68c586afb91a0a208ab88892800ae30dd55793f153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Mon, 22 Jul 2024 20:57:02 +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-Graph-Easy?expand=0&rev=4 --- perl-Graph-Easy.spec | 70 ++++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/perl-Graph-Easy.spec b/perl-Graph-Easy.spec index 07cb521..c993a4c 100644 --- a/perl-Graph-Easy.spec +++ b/perl-Graph-Easy.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Graph-Easy # -# Copyright (c) 2016 SUSE LINUX 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,26 +12,57 @@ # 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/ # -Name: perl-Graph-Easy -Version: 0.76 -Release: 0 %define cpan_name Graph-Easy +Name: perl-Graph-Easy +Version: 0.760.0 +Release: 0 +# 0.76 -> normalize -> 0.760.0 +%define cpan_version 0.76 +License: GPL-1.0-or-later Summary: Convert or render graphs (as ASCII, HTML, SVG or via Graphviz) -License: GPL-1.0+ -Group: Development/Libraries/Perl -Url: http://search.cpan.org/dist/Graph-Easy/ -Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz +URL: https://metacpan.org/release/%{cpan_name} +Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Module::Build) >= 0.360000 -Recommends: perl(Graph::Easy::As_svg) >= 0.23 +BuildRequires: perl(Module::Build) >= 0.36 +Provides: perl(Graph::Easy) = %{version} +Provides: perl(Graph::Easy::As_ascii) = %{version} +Provides: perl(Graph::Easy::As_graphml) = %{version} +Provides: perl(Graph::Easy::As_graphviz) = %{version} +Provides: perl(Graph::Easy::As_txt) = %{version} +Provides: perl(Graph::Easy::As_vcg) = %{version} +Provides: perl(Graph::Easy::Attributes) = %{version} +Provides: perl(Graph::Easy::Base) = %{version} +Provides: perl(Graph::Easy::Edge) = %{version} +Provides: perl(Graph::Easy::Edge::Cell) = %{version} +Provides: perl(Graph::Easy::Edge::Cell::Empty) = %{version} +Provides: perl(Graph::Easy::Group) = %{version} +Provides: perl(Graph::Easy::Group::Anon) = %{version} +Provides: perl(Graph::Easy::Group::Cell) = %{version} +Provides: perl(Graph::Easy::Heap) +Provides: perl(Graph::Easy::Layout) = %{version} +Provides: perl(Graph::Easy::Layout::Chain) = %{version} +Provides: perl(Graph::Easy::Layout::Force) = %{version} +Provides: perl(Graph::Easy::Layout::Grid) = %{version} +Provides: perl(Graph::Easy::Layout::Path) = %{version} +Provides: perl(Graph::Easy::Layout::Repair) = %{version} +Provides: perl(Graph::Easy::Layout::Scout) = %{version} +Provides: perl(Graph::Easy::Node) = %{version} +Provides: perl(Graph::Easy::Node::Anon) = %{version} +Provides: perl(Graph::Easy::Node::Cell) = %{version} +Provides: perl(Graph::Easy::Node::Empty) = %{version} +Provides: perl(Graph::Easy::Parser) = %{version} +Provides: perl(Graph::Easy::Parser::Graphviz) = %{version} +Provides: perl(Graph::Easy::Parser::VCG) = %{version} +Provides: perl(Graph::Easy::Util) +%undefine __perllib_provides +Recommends: perl(Graph::Easy::As_svg) >= 0.230 %{perl_requires} %description @@ -45,22 +76,23 @@ Since the layouter works on a grid (manhattan layout), the output is most useful for flow charts, network diagrams, or hierarchy trees. %prep -%setup -q -n %{cpan_name}-%{version} -find . -type f ! -name \*.pl -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} Build.PL installdirs=vendor -./Build build flags=%{?_smp_mflags} +perl Build.PL --installdirs=vendor +./Build build --flags=%{?_smp_mflags} %check ./Build test %install -./Build install destdir=%{buildroot} create_packlist=0 +./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files -%defattr(-,root,root,755) -%doc bench CHANGES examples LICENSE README scripts TODO +%doc CHANGES examples README TODO +%license LICENSE %changelog