2024-07-20 20:49:32 +00:00
committed by Git OBS Bridge
parent a38dfc1f9f
commit 01d5fd5fee
2 changed files with 78 additions and 32 deletions

35
cpanspec.yml Normal file
View 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

View File

@@ -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
Version: 0.04
Version: 0.40.0
Release: 0
Summary: Traverse a data structure, altering it in place
Source: http://search.cpan.org/CPAN/authors/id/B/BA/BALDUR/Data-Transformer-%{version}.tar.gz
URL: http://search.cpan.org/dist/Data-Transformer
Group: Development/Libraries/Perl
License: Perl License
BuildRoot: %{_tmppath}/build-%{name}-%{version}
%{perl_requires}
BuildRequires: perl-macros
BuildRequires: make
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Simple) >= 0.44
%if 0%{?suse_version} >= 1120
# 0.04 -> normalize -> 0.40.0
%define cpan_version 0.04
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Traverse a data structure, alter it in place
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/B/BA/BALDUR/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
%endif
BuildRequires: perl
BuildRequires: perl-macros
Provides: perl(Data::Transformer) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
Perl module to traverse a data structure while altering its elements in place.
Traverse a data structure, alter it in place
%prep
%setup -q -n "Data-Transformer-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%autosetup -n %{cpan_name}-%{cpan_version}
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%check
%__make test
%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}
%files -f %{name}.files
%doc Changes README Todo
%license LICENSE
%changelog