From e4939f08fd27ea42d98ffaa00ea6cd0ddc6763cd216c16d8810c4676ea5d657c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Sun, 4 Aug 2024 18:32:36 +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-Unicode-UTF8simple?expand=0&rev=11 --- perl-Unicode-UTF8simple.spec | 61 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/perl-Unicode-UTF8simple.spec b/perl-Unicode-UTF8simple.spec index 6c51e66..641f9f8 100644 --- a/perl-Unicode-UTF8simple.spec +++ b/perl-Unicode-UTF8simple.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Unicode-UTF8simple # -# Copyright (c) 2011 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,54 +12,53 @@ # 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 modname Unicode-UTF8simple - -Name: perl-%{modname} -Version: 1.06 -Release: 1 +%define cpan_name Unicode-UTF8simple +Name: perl-Unicode-UTF8simple +Version: 1.50.0 +Release: 0 +# 1.05 -> normalize -> 1.50.0 +%define cpan_version 1.05 +License: CHECK(Artistic-1.0 or GPL-1.0-or-later) Summary: Conversions to/from UTF8 from/to charactersets +URL: https://metacpan.org/release/%{cpan_name} +Source0: https://cpan.metacpan.org/authors/id/G/GU/GUS/%{cpan_name}-1.06.tar.gz +BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros -License: GPL/Artistic -Group: Development/Libraries/Perl -Source: %{modname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: perl(Unicode::UTF8simple) = 1.60.0 +%undefine __perllib_provides %{perl_requires} %description -This utf-8 converter is written in plain perl and works with hopefully any perl -5 version. It was mainly written because more recent modules such as Encode do -not work under older Perl 5.0 installations. +Provides UTF-8 conversion for perl versions from 5.00 and up. It was mainly +written for use with perl 5.00 to 5.6.0 because those perl versions do not +support Unicode::MapUTF8 or Encode. -Authors: --------- - Guido Socher +Unicode::UTF8simple is written in plain perl (no C code) and will work with +any Perl 5 version. It is just slightly slower than Encode. %prep -%setup -q -n %{modname}-%{version} +%autosetup -n %{cpan_name}-1.06 + +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build -perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" -make +perl Makefile.PL INSTALLDIRS=vendor +%make_build + +%check make test %install -rm -rf %{buildroot} -make DESTDIR=$RPM_BUILD_ROOT install_vendor +%perl_make_install %perl_process_packlist +%perl_gen_filelist -%clean -rm -rf %{buildroot} - -%files -%defattr(-, root, root) -%doc README test.pl -%doc %{_mandir}/man?/* -%{perl_vendorlib}/Unicode -%{perl_vendorarch}/auto/Unicode +%files -f %{name}.files +%doc gb2312.txt README %changelog