| |
@@ -1,15 +1,17 @@
|
| |
Name: perl-URI-Title
|
| |
- Version: 1.902
|
| |
- Release: 11%{?dist}
|
| |
+ Version: 1.903
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Get the titles of things on the web in a sensible way
|
| |
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/URI-Title
|
| |
Source0: https://cpan.metacpan.org/authors/id/B/BO/BOOK/URI-Title-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
# Build
|
| |
- BuildRequires: make
|
| |
+ BuildRequires: coreutils
|
| |
+ BuildRequires: make
|
| |
BuildRequires: perl-interpreter
|
| |
BuildRequires: perl-generators
|
| |
+ BuildRequires: perl(Config)
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
BuildRequires: perl(strict)
|
| |
BuildRequires: perl(warnings)
|
| |
@@ -39,10 +41,13 @@
|
| |
# Needed for Twitter in live tests
|
| |
BuildRequires: perl(LWP::Protocol::https)
|
| |
BuildRequires: perl(Test::More) >= 0.88
|
| |
+ # Optional tests needs net connections
|
| |
+ #BuildRequires: perl(Image::ExifTool)
|
| |
Requires: perl(Encode)
|
| |
Requires: perl(File::Type) >= 0.22
|
| |
Requires: perl(LWP::Protocol::https)
|
| |
Requires: perl(Module::Pluggable) >= 1.2
|
| |
+ Recommends: perl(Image::ExifTool)
|
| |
|
| |
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(File::Type\\)$
|
| |
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Module::Pluggable\\)$
|
| |
@@ -61,8 +66,23 @@
|
| |
|
| |
So, let's solve these issues once.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl(Image::ExifTool)
|
| |
+ Requires: perl-Test-Harness
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n URI-Title-%{version}
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
@@ -72,8 +92,18 @@
|
| |
%{make_install}
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
- %check
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ rm -rf %{buildroot}%{_libexecdir}/%{name}/t/author-*
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -r -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
+ %check
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -82,7 +112,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Wed Jan 25 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1.903-1
|
| |
+ - 1.903 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.902-11
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
|
| |