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-Data-Transformer?expand=0&rev=2
This commit is contained in:
35
cpanspec.yml
Normal file
35
cpanspec.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
#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: Artistic-1.0 or GPL-1.0-or-later
|
||||||
|
#skip_noarch: 1
|
||||||
|
#custom_build: |-
|
||||||
|
#./Build build flags=%{?_smp_mflags} --myflag
|
||||||
|
#custom_test: |-
|
||||||
|
#startserver && make test
|
||||||
|
#ignore_requires: Bizarre::Module
|
||||||
|
#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
|
@@ -1,48 +1,59 @@
|
|||||||
# vim: set sw=4 ts=4 et nu:
|
#
|
||||||
|
# spec file for package perl-Data-Transformer
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define cpan_name Data-Transformer
|
||||||
Name: perl-Data-Transformer
|
Name: perl-Data-Transformer
|
||||||
Version: 0.04
|
Version: 0.40.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Traverse a data structure, altering it in place
|
# 0.04 -> normalize -> 0.40.0
|
||||||
Source: http://search.cpan.org/CPAN/authors/id/B/BA/BALDUR/Data-Transformer-%{version}.tar.gz
|
%define cpan_version 0.04
|
||||||
URL: http://search.cpan.org/dist/Data-Transformer
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||||
Group: Development/Libraries/Perl
|
Summary: Traverse a data structure, alter it in place
|
||||||
License: Perl License
|
URL: https://metacpan.org/release/%{cpan_name}
|
||||||
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
Source0: https://cpan.metacpan.org/authors/id/B/BA/BALDUR/%{cpan_name}-%{cpan_version}.tar.gz
|
||||||
%{perl_requires}
|
Source1: cpanspec.yml
|
||||||
BuildRequires: perl-macros
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
||||||
BuildRequires: perl(Test::Simple) >= 0.44
|
|
||||||
%if 0%{?suse_version} >= 1120
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
BuildRequires: perl
|
||||||
|
BuildRequires: perl-macros
|
||||||
|
Provides: perl(Data::Transformer) = %{version}
|
||||||
|
%undefine __perllib_provides
|
||||||
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Perl module to traverse a data structure while altering its elements in place.
|
Traverse a data structure, alter it in place
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n "Data-Transformer-%{version}"
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
||||||
%__sed -i '/^auto_install/d' Makefile.PL
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%__perl Makefile.PL PREFIX="%{_prefix}"
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
%__make %{?jobs:-j%{jobs}}
|
%make_build
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
|
%perl_gen_filelist
|
||||||
|
|
||||||
%check
|
%files -f %{name}.files
|
||||||
%__make test
|
%doc Changes README Todo
|
||||||
|
%license LICENSE
|
||||||
%clean
|
|
||||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc Changes Todo README LICENSE
|
|
||||||
%dir %{perl_vendorlib}/Data
|
|
||||||
%{perl_vendorlib}/Data/Transformer.pm
|
|
||||||
%doc %{perl_man3dir}/Data::Transformer.%{perl_man3ext}%{ext_man}
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
Reference in New Issue
Block a user