11Vendor: Microsoft Corporation
22Distribution: Azure Linux
33Name: perl-Business-ISBN
4- %global cpan_version 3.005
4+ %global cpan_version 3.009
55Version: %(echo '%{cpan_version }' | tr '_' '.'})
6- Release: 3 %{?dist }
6+ Release: 1 %{?dist }
77Summary: Perl module to work with International Standard Book Numbers
88
99License: Artistic 2.0
1010URL: https://metacpan.org/release/Business-ISBN
11- Source0: https://cpan.metacpan.org/authors/id/B/BD/BDFOY /Business-ISBN-%{cpan_version }.tar.gz#/perl-Business-ISBN-%{cpan_version}.tar.gz
11+ Source0: https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY /Business-ISBN-%{cpan_version }.tar.gz#/perl-Business-ISBN-%{cpan_version}.tar.gz
1212BuildArch: noarch
1313BuildRequires: coreutils
1414BuildRequires: findutils
1515BuildRequires: make
1616BuildRequires: perl-interpreter
1717BuildRequires: perl-generators
18+ BuildRequires: perl(Config)
1819BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
1920BuildRequires: perl(File::Spec)
2021BuildRequires: perl(File::Spec::Functions)
@@ -23,7 +24,7 @@ BuildRequires: perl(warnings)
2324# Test::Manifest 1.21 is optional
2425# Run-time:
2526BuildRequires: perl(base)
26- BuildRequires: perl(Business::ISBN::Data) >= 20191107
27+ BuildRequires: perl(Business::ISBN::Data) >= 20230322.001
2728BuildRequires: perl(Carp)
2829BuildRequires: perl(Data::Dumper)
2930BuildRequires: perl(Exporter)
@@ -43,27 +44,65 @@ Requires: perl(GD::Barcode::EAN13)
4344This modules handles International Standard Book Numbers, including
4445ISBN-10 and ISBN-13.
4546
47+ For exporting ISBN into a bar code, with png_barcode(), you need to install
48+ GD::Barcode::EAN13 Perl module.
49+
50+ %package tests
51+ Summary: Tests for %{name }
52+ Requires: %{name } = %{?epoch:%{epoch }:}%{version }-%{release }
53+ Requires: perl-Test-Harness
54+
55+ %description tests
56+ Tests from %{name }. Execute them
57+ with "%{_libexecdir }/%{name }/test".
58+
4659%prep
4760%setup -q -n Business-ISBN-%{cpan_version }
4861
62+ # Help generators to recognize Perl scripts
63+ for F in `find t -name *.t`; do
64+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && ! s{\A#!.*perl\b}{$Config{startperl}}' "$F"
65+ chmod +x "$F"
66+ done
67+
4968%build
5069perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
5170%{make_build }
5271
5372%install
5473%{make_install }
55- %{_fixperms } -c $RPM_BUILD_ROOT /*
74+ %{_fixperms } -c %{buildroot }/*
75+
76+ # Install tests
77+ mkdir -p %{buildroot }%{_libexecdir }/%{name }
78+ cp -a t %{buildroot }%{_libexecdir }/%{name }
79+ # Remove release tests
80+ rm %{buildroot }%{_libexecdir }/%{name }/t/pod*
81+ cat > %{buildroot }%{_libexecdir }/%{name }/test << 'EOF'
82+ #!/bin/sh
83+ cd %{_libexecdir }/%{name } && exec prove -I . -r -j "$(getconf _NPROCESSORS_ONLN)"
84+ EOF
85+ chmod +x %{buildroot }%{_libexecdir }/%{name }/test
5686
5787%check
88+ export HARNESS_OPTIONS=j$( perl -e ' if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- ' %{?_smp_mflags}' )
5889make test
5990
91+
6092%files
6193%license LICENSE
6294%doc Changes README.pod
63- %{perl_vendorlib} /*
64- %{_mandir }/man3/* .3*
95+ %{perl_vendorlib} /Business*
96+ %{_mandir }/man3/Business::ISBN* .3*
97+
98+ %files tests
99+ %{_libexecdir }/%{name }
65100
66101%changelog
102+ *
Fri Dec 13 2024 Jyoti Kanase <[email protected] > -
3.009-1 103+ - Update to 3.009
104+ - License Verified.
105+
67106*
Fri Oct 15 2021 Pawel Winogrodzki <[email protected] > -
3.005-3 68107- Initial CBL-Mariner import from Fedora 32 (license: MIT).
69108
0 commit comments