diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..41ff754 --- /dev/null +++ b/cpanspec.yml @@ -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: diff --git a/perl-IO-String.changes b/perl-IO-String.changes index 39d6d5c..f43c757 100644 --- a/perl-IO-String.changes +++ b/perl-IO-String.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 14 12:43:52 UTC 2025 - Tina Müller + +- 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 diff --git a/perl-IO-String.spec b/perl-IO-String.spec index dfdfc5d..052429c 100644 --- a/perl-IO-String.spec +++ b/perl-IO-String.spec @@ -1,7 +1,7 @@ # # 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 # 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) # 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 -License: Artistic-1.0 -Group: Development/Libraries/Perl -Url: http://search.cpan.org/~gaas/ -AutoReqProv: on -Summary: Perl IO/String interface -Version: 1.08 -Release: 152 -Source: %{cpan_name}-%{version}.tar.gz +Name: perl-IO-String +Version: 1.80.0 +Release: 0 +# 1.08 -> normalize -> 1.80.0 +%define cpan_version 1.08 +License: Artistic-1.0 OR GPL-1.0-or-later +Summary: Emulate file interface for in-core strings +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 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} +BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros +Provides: perl(IO::String) = %{version} +%undefine __perllib_provides +%{perl_requires} %description -IO::String is an IO::File (and IO::Handle) compatible class that reads -or writes data from in-core strings. +The 'IO::String' module provides the 'IO::File' interface for in-core +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. - -Authors: --------- - Gisle Aas. +The 'IO::String' module provides an interface compatible with 'IO::File' as +distributed with _IO-1.20_, but the following methods are not available: +new_from_fd, fdopen, format_write, format_page_number, +format_lines_per_page, format_lines_left, format_name, format_top_name. %prep -%setup -n %{cpan_name}-%{version} -# --------------------------------------------------------------------------- +%autosetup -n %{cpan_name}-%{cpan_version} -p1 %build -perl Makefile.PL -make %{?_smp_mflags} -# --------------------------------------------------------------------------- +perl Makefile.PL INSTALLDIRS=vendor +%make_build + +%check +make test %install -[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; -make DESTDIR=$RPM_BUILD_ROOT install_vendor +%perl_make_install %perl_process_packlist +%perl_gen_filelist -%files -%defattr(-,root,root) -%{perl_vendorlib}/IO -%{perl_vendorarch}/auto/IO -%{perl_vendorarch}/auto/IO/String -%doc %{_mandir}/man3/*.gz -%doc MANIFEST Changes README* +%files -f %{name}.files +%doc Changes README %changelog