195 lines
6.4 KiB
RPMSpec
195 lines
6.4 KiB
RPMSpec
# Perform optional tests
|
|
%if 0%{?rhel}
|
|
%bcond_with perl_Types_URI_enables_optional_test
|
|
%else
|
|
%bcond_without perl_Types_URI_enables_optional_test
|
|
%endif
|
|
|
|
%define optional_test %[%{with perl_Types_URI_enables_optional_test} && !%{defined %perl_bootstrap}]
|
|
|
|
Name: perl-Types-URI
|
|
Version: 0.007
|
|
Release: 13%{?dist}
|
|
Summary: Type constraints and coercions for URIs
|
|
# COPYRIGHT: Public Domain
|
|
# other files: GPL+ or Artistic
|
|
License: (GPL+ or Artistic) and Public Domain
|
|
URL: https://metacpan.org/release/Types-URI
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Types-URI-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: make
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: perl(Config)
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
BuildRequires: perl(strict)
|
|
# Run-time:
|
|
BuildRequires: perl(:VERSION) >= 5.8
|
|
BuildRequires: perl(Type::Library) >= 1.000000
|
|
BuildRequires: perl(Types::Path::Tiny)
|
|
BuildRequires: perl(Types::Standard)
|
|
BuildRequires: perl(Types::UUID)
|
|
BuildRequires: perl(URI)
|
|
BuildRequires: perl(URI::data)
|
|
BuildRequires: perl(URI::file)
|
|
BuildRequires: perl(URI::FromHash)
|
|
BuildRequires: perl(URI::WithBase)
|
|
BuildRequires: perl(warnings)
|
|
# Tests:
|
|
BuildRequires: perl(if)
|
|
BuildRequires: perl(Test::More) >= 0.96
|
|
# Test::Warnings not used
|
|
# Build cycle: perl-Attean → perl-Types-URI
|
|
%if %{optional_test}
|
|
# Optional tests:
|
|
BuildRequires: perl(Attean)
|
|
BuildRequires: perl(Attean::IRI)
|
|
BuildRequires: perl(IRI) >= 0.004
|
|
BuildRequires: perl(Moose) >= 2.0000
|
|
BuildRequires: perl(RDF::Trine) >= 1.000
|
|
BuildRequires: perl(Test::Requires)
|
|
BuildRequires: perl(Types::Attean) >= 0.024
|
|
BuildRequires: perl(Types::Namespace) >= 1.10
|
|
%endif
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
Requires: perl(Type::Library) >= 1.000000
|
|
|
|
# Remove under-specified dependencies
|
|
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Moose|Test::More|Type::Library|Types::Attean|Types::Namespace)\\)$
|
|
|
|
%description
|
|
Types::URI is a type constraint Perl library suitable for use with Moo/Moose
|
|
attributes, Kavorka sub signatures, and so forth.
|
|
|
|
%package tests
|
|
Summary: Tests for %{name}
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Requires: perl-Test-Harness
|
|
Requires: perl(Test::More) >= 0.96
|
|
%if %{optional_test}
|
|
Requires: perl(Attean)
|
|
Requires: perl(IRI) >= 0.004
|
|
Requires: perl(Moose) >= 2.0000
|
|
Requires: perl(RDF::Trine) >= 1.000
|
|
Requires: perl(Types::Attean) >= 0.024
|
|
Requires: perl(Types::Namespace) >= 1.10
|
|
%endif
|
|
|
|
%description tests
|
|
Tests from %{name}. Execute them
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
%prep
|
|
%setup -q -n Types-URI-%{version}
|
|
%if !%{optional_test}
|
|
for F in t/02attean.t t/02trine.t t/03iri.t t/50mxt-basic.t t/51mxt-fully-qualified.t; do
|
|
rm "$F"
|
|
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
|
|
done
|
|
%endif
|
|
# Help generators to recognize Perl scripts
|
|
for F in t/*.t; do
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
|
chmod +x "$F"
|
|
done
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
%{make_build}
|
|
|
|
%install
|
|
%{make_install}
|
|
%{_fixperms} %{buildroot}/*
|
|
# Install tests
|
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
|
#!/bin/sh
|
|
%if %{optional_test}
|
|
unset AUTHOR_TESTING
|
|
%endif
|
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
EOF
|
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
%check
|
|
%if %{optional_test}
|
|
unset AUTHOR_TESTING
|
|
%endif
|
|
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
|
make test
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc Changes COPYRIGHT CREDITS README
|
|
%{perl_vendorlib}/*
|
|
%{_mandir}/man3/*
|
|
|
|
%files tests
|
|
%{_libexecdir}/%{name}
|
|
|
|
%changelog
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-13
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-12
|
|
- Perl 5.36 rebuild
|
|
|
|
* Thu Jan 27 2022 Petr Pisar <ppisar@redhat.com> - 0.007-11
|
|
- Package the tests
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-10
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-9
|
|
- Second attempt - Rebuilt for
|
|
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-8
|
|
- Perl 5.34 re-rebuild of bootstrapped packages
|
|
|
|
* Sun May 23 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-7
|
|
- Perl 5.34 rebuild
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-6
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-4
|
|
- Perl 5.32 re-rebuild of bootstrapped packages
|
|
|
|
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.007-3
|
|
- Perl 5.32 rebuild
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
* Thu Nov 21 2019 Petr Pisar <ppisar@redhat.com> - 0.007-1
|
|
- 0.007 bump
|
|
|
|
* Mon Nov 11 2019 Petr Pisar <ppisar@redhat.com> - 0.006-8
|
|
- Modernize a spec file
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.006-6
|
|
- Perl 5.30 rebuild
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.006-3
|
|
- Perl 5.28 rebuild
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
* Thu Jan 04 2018 Petr Pisar <ppisar@redhat.com> 0.006-1
|
|
- Specfile autogenerated by cpanspec 1.78.
|