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-Convert-Bencode?expand=0&rev=2
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Convert-Bencode (Version 1.03)
|
# spec file for package perl-Convert-Bencode
|
||||||
#
|
#
|
||||||
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -12,69 +12,48 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# 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-Convert-Bencode
|
|
||||||
Version: 1.03
|
|
||||||
Release: 1
|
|
||||||
License: Distributable, see LICENSE
|
|
||||||
%define cpan_name Convert-Bencode
|
%define cpan_name Convert-Bencode
|
||||||
|
Name: perl-Convert-Bencode
|
||||||
|
Version: 1.30.0
|
||||||
|
Release: 0
|
||||||
|
# 1.03 -> normalize -> 1.30.0
|
||||||
|
%define cpan_version 1.03
|
||||||
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||||
Summary: Functions for converting to/from bencoded strings
|
Summary: Functions for converting to/from bencoded strings
|
||||||
Url: http://search.cpan.org/dist/Convert-Bencode/
|
URL: https://metacpan.org/release/%{cpan_name}
|
||||||
Group: Development/Libraries/Perl
|
Source0: https://cpan.metacpan.org/authors/id/O/OR/ORCLEV/%{cpan_name}-%{cpan_version}.tar.gz
|
||||||
#Source: http://www.cpan.org/authors/id/O/OR/ORCLEV/Convert-Bencode-%{version}.tar.gz
|
BuildArch: noarch
|
||||||
Source: %{cpan_name}-%{version}.tar.gz
|
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Provides: perl(Convert::Bencode) = %{version}
|
||||||
BuildArch: noarch
|
%undefine __perllib_provides
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This module provides two functions, 'bencode' and 'bdecode', which encode
|
This module provides two functions, 'bencode' and 'bdecode', which encode
|
||||||
and decode bencoded strings respectivly.
|
and decode bencoded strings respectivly.
|
||||||
|
|
||||||
Encoding
|
|
||||||
'bencode()' expects to be passed a single value, which is either a
|
|
||||||
scalar, a arrary ref, or a hash ref, and it returns a scalar containing
|
|
||||||
the bencoded representation of the data structure it was passed. If the
|
|
||||||
value passed was a scalar, it returns either a bencoded string, or a
|
|
||||||
bencoded integer (floating points are not implemented, and would be
|
|
||||||
returned as a string rather than a integer). If the value was a array
|
|
||||||
ref, it returns a bencoded list, with all the values of that array also
|
|
||||||
bencoded recursivly. If the value was a hash ref, it returns a bencoded
|
|
||||||
dictionary (which for all intents and purposes can be thought of as a
|
|
||||||
synonym for hash) containing the recursivly bencoded key and value
|
|
||||||
pairs of the hash.
|
|
||||||
|
|
||||||
Decoding
|
|
||||||
'bdecode()' expects to be passed a single scalar containing the
|
|
||||||
bencoded string to be decoded. Its return value will be either a hash
|
|
||||||
ref, a array ref, or a scalar, depending on whether the outer most
|
|
||||||
element of the bencoded string was a dictionary, list, or a
|
|
||||||
string/integer respectivly.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
%{__make} %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__make} test
|
make test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(644,root,root,755)
|
%doc Changes README Todo
|
||||||
%doc Changes LICENSE README Todo
|
%license LICENSE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user