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-Algorithm-RectanglesContainingDot?expand=0&rev=4
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Algorithm-RectanglesContainingDot (Version 0.02)
|
||||
# spec file for package perl-Algorithm-RectanglesContainingDot
|
||||
#
|
||||
# Copyright (c) 2010 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,25 +12,25 @@
|
||||
# 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-Algorithm-RectanglesContainingDot
|
||||
Version: 0.02
|
||||
Release: 1
|
||||
License: GPL+ or Artistic
|
||||
|
||||
%define cpan_name Algorithm-RectanglesContainingDot
|
||||
Summary: find rectangles containing a given dot
|
||||
Url: http://search.cpan.org/dist/Algorithm-RectanglesContainingDot/
|
||||
Group: Development/Libraries/Perl
|
||||
Source: http://www.cpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{version}.tar.gz
|
||||
Name: perl-Algorithm-RectanglesContainingDot
|
||||
Version: 0.20.0
|
||||
Release: 0
|
||||
# 0.02 -> normalize -> 0.20.0
|
||||
%define cpan_version 0.02
|
||||
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||
Summary: Find rectangles containing a given dot
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{cpan_version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(Test::More)
|
||||
Requires: perl(Test::More)
|
||||
Provides: perl(Algorithm::RectanglesContainingDot) = %{version}
|
||||
%undefine __perllib_provides
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
@@ -44,44 +44,40 @@ Its usage is very simple:
|
||||
|
||||
* 1) create and algorithm object:
|
||||
|
||||
$a = Algorithm::RectanglesContainingDot->new;
|
||||
$a = Algorithm::RectanglesContainingDot->new;
|
||||
|
||||
* 2) add the rectangles:
|
||||
|
||||
$a->add_rectangle($name, $x0, $y0, $x1, $y1);
|
||||
$a->add_rectangle($name, $x0, $y0, $x1, $y1);
|
||||
|
||||
Rectangles are identified by a name that can be any perl scalar
|
||||
(typically an integer or a string).
|
||||
Rectangles are identified by a name that can be any perl scalar (typically
|
||||
an integer or a string).
|
||||
|
||||
($x0, $y0) and ($x1, $y1) correspond to the coordinates of the
|
||||
left-botton and right-top vertices respectively.
|
||||
($x0, $y0) and ($x1, $y1) correspond to the coordinates of the left-botton
|
||||
and right-top vertices respectively.
|
||||
|
||||
* 3) call the search method for every dot:
|
||||
|
||||
@rects = $a->rectangles_containing_dot($x, $y)
|
||||
@rects = $a->rectangles_containing_dot($x, $y)
|
||||
|
||||
Returns the names of the rectangles containing the dot ($x, $y).
|
||||
Returns the names of the rectangles containing the dot ($x, $y).
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
%autosetup -n %{cpan_name}-%{cpan_version}
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
%{__make} %{?_smp_mflags}
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
%make_build
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes README
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user