8
0

Normalize CPAN version

See https://github.com/openSUSE/cpanspec/issues/47 for details
This commit is contained in:
2025-10-14 14:44:25 +02:00
parent ada304f078
commit c0e7a73e96
3 changed files with 86 additions and 35 deletions

39
cpanspec.yml Normal file
View File

@@ -0,0 +1,39 @@
---
description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
# baz.patch: PATCH-FIX-OPENSUSE
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module
#ignore_provides: Module::To::Ignore
#skip_doc: regexp_to_skip_for_doc.*
#add_doc: files to add to docs
#misc: |-
#anything else to be added to spec file
#follows directly after %files section, so it can contain new blocks or also
#changes to %files section
#epoch: number
# Where module files should be searched for. Default: lib/
#index_dir:

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Oct 14 12:43:52 UTC 2025 - Tina Müller <tina.mueller@suse.com>
- Normalize CPAN version
See https://github.com/openSUSE/cpanspec/issues/47 for details
- Add cpanspec.yml to override description length
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 18 11:10:55 UTC 2011 - coolo@suse.com Fri Nov 18 11:10:55 UTC 2011 - coolo@suse.com

View File

@@ -1,7 +1,7 @@
# #
# spec file for package perl-IO-String # spec file for package perl-IO-String
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2025 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,58 +12,63 @@
# 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/
# #
# norootforbuild
Name: perl-IO-String
%define cpan_name IO-String %define cpan_name IO-String
License: Artistic-1.0 Name: perl-IO-String
Group: Development/Libraries/Perl Version: 1.80.0
Url: http://search.cpan.org/~gaas/ Release: 0
AutoReqProv: on # 1.08 -> normalize -> 1.80.0
Summary: Perl IO/String interface %define cpan_version 1.08
Version: 1.08 License: Artistic-1.0 OR GPL-1.0-or-later
Release: 152 Summary: Emulate file interface for in-core strings
Source: %{cpan_name}-%{version}.tar.gz URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/G/GA/GAAS/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md Source100: README.md
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch
%{perl_requires}
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
Provides: perl(IO::String) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description %description
IO::String is an IO::File (and IO::Handle) compatible class that reads The 'IO::String' module provides the 'IO::File' interface for in-core
or writes data from in-core strings. strings. An 'IO::String' object can be attached to a string, and makes it
possible to use the normal file operations for reading or writing data, as
well as for seeking to various locations of the string. This is useful when
you want to use a library module that only provides an interface to file
handles on data that you have in a string variable.
Note that perl-5.8 and better has built-in support for "in memory" files,
which are set up by passing a reference instead of a filename to the open()
call. The reason for using this module is that it makes the code backwards
compatible with older versions of Perl.
The 'IO::String' module provides an interface compatible with 'IO::File' as
Authors: distributed with _IO-1.20_, but the following methods are not available:
-------- new_from_fd, fdopen, format_write, format_page_number,
Gisle Aas. <gisle@aas.no> format_lines_per_page, format_lines_left, format_name, format_top_name.
%prep %prep
%setup -n %{cpan_name}-%{version} %autosetup -n %{cpan_name}-%{cpan_version} -p1
# ---------------------------------------------------------------------------
%build %build
perl Makefile.PL perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} %make_build
# ---------------------------------------------------------------------------
%check
make test
%install %install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; %perl_make_install
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist %perl_process_packlist
%perl_gen_filelist
%files %files -f %{name}.files
%defattr(-,root,root) %doc Changes README
%{perl_vendorlib}/IO
%{perl_vendorarch}/auto/IO
%{perl_vendorarch}/auto/IO/String
%doc %{_mandir}/man3/*.gz
%doc MANIFEST Changes README*
%changelog %changelog