commit 8bf2f74a740504c60d26735f4dd60688288de5b1 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Thu Jan 27 16:01:13 2011 +0000 Initial import (perl-Perl-OSType-1.002-3) Modules that provide OS-specific behaviors often need to know if the current operating system matches a more generic type of operating systems. For example, 'linux' is a type of 'Unix' operating system and so is 'freebsd'. This module provides a mapping between an operating system name as given by $^O and a more generic type. The initial version is based on the OS type mappings provided in Module::Build and ExtUtils::CBuilder (thus, Microsoft operating systems are given the type 'Windows' rather than 'Win32'). .gitignore | 1 + Perl-OSType-1.002-old-EU::MM.patch | 30 +++++++++++ Perl-OSType-1.002-old-Test::More.patch | 18 ++++++ perl-Perl-OSType.spec | 89 ++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 139 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..b924dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Perl-OSType-1.002.tar.gz diff --git a/Perl-OSType-1.002-old-EU::MM.patch b/Perl-OSType-1.002-old-EU::MM.patch new file mode 100644 index 0000000..1a357be --- /dev/null +++ b/Perl-OSType-1.002-old-EU::MM.patch @@ -0,0 +1,30 @@ +--- Perl-OSType-1.002/Makefile.PL 2010-11-16 14:02:55.000000000 +0000 ++++ Perl-OSType-1.002/Makefile.PL 2011-01-25 11:03:37.350523574 +0000 +@@ -4,7 +4,7 @@ + + BEGIN { require 5.006; } + +-use ExtUtils::MakeMaker 6.31; ++use ExtUtils::MakeMaker; + + + +@@ -18,7 +18,7 @@ + 'constant' => '0' + }, + 'CONFIGURE_REQUIRES' => { +- 'ExtUtils::MakeMaker' => '6.31' ++ 'ExtUtils::MakeMaker' => '0' + }, + 'DISTNAME' => 'Perl-OSType', + 'EXE_FILES' => [], +@@ -50,6 +50,9 @@ + delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + ++delete $WriteMakefileArgs{LICENSE} ++ unless eval { ExtUtils::MakeMaker->VERSION(6.31) }; ++ + WriteMakefile(%WriteMakefileArgs); + + diff --git a/Perl-OSType-1.002-old-Test::More.patch b/Perl-OSType-1.002-old-Test::More.patch new file mode 100644 index 0000000..711c8bb --- /dev/null +++ b/Perl-OSType-1.002-old-Test::More.patch @@ -0,0 +1,18 @@ +--- Perl-OSType-1.002/t/OSType.t 2010-11-16 14:02:55.000000000 +0000 ++++ Perl-OSType-1.002/t/OSType.t 2011-01-25 11:09:41.278401763 +0000 +@@ -1,7 +1,7 @@ + use strict; + use warnings; + +-use Test::More 0.88; ++use Test::More tests => 19; + + use constant NON_EXISTENT_OS => 'titanix'; #the system they said could not go down... + +@@ -66,6 +66,3 @@ + ok( is_os_type( 'VOS' ), "$fcn: true" ); + ok( ! is_os_type(), "$fcn: false if no type provided" ); + } +- +-done_testing; +- diff --git a/perl-Perl-OSType.spec b/perl-Perl-OSType.spec new file mode 100644 index 0000000..d0646a4 --- /dev/null +++ b/perl-Perl-OSType.spec @@ -0,0 +1,89 @@ +# We don't really need ExtUtils::MakeMaker > 6.31 +%global old_eumm %(perl -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.31 ? 1 : 0;' 2>/dev/null || echo 0) + +# Test suite needs patching if we have Test::More < 0.88 +%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0) + +Name: perl-Perl-OSType +Version: 1.002 +Release: 3%{?dist} +Summary: Map Perl operating system names to generic types +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Perl-OSType/ +Source0: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Perl-OSType-%{version}.tar.gz +Patch0: Perl-OSType-1.002-old-EU::MM.patch +Patch1: Perl-OSType-1.002-old-Test::More.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +# Pod::Coverage::TrustPod not yet in EPEL-4 +%if "%{?rhel}" != "4" +BuildRequires: perl(Pod::Coverage::TrustPod) +%endif +BuildRequires: perl(Test::CPAN::Meta) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) +BuildRequires: perl(Test::Portability::Files) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%description +Modules that provide OS-specific behaviors often need to know if the current +operating system matches a more generic type of operating systems. For example, +'linux' is a type of 'Unix' operating system and so is 'freebsd'. + +This module provides a mapping between an operating system name as given by $^O +and a more generic type. The initial version is based on the OS type mappings +provided in Module::Build and ExtUtils::CBuilder (thus, Microsoft operating +systems are given the type 'Windows' rather than 'Win32'). + +%prep +%setup -q -n Perl-OSType-%{version} + +# We don't really need ExtUtils::MakeMaker 6.31 +%if %{old_eumm} +%patch0 -p1 +%endif + +# Fix test suite for Test::More < 0.88 +%if %{old_test_more} +%patch1 -p1 +%endif + +%build +perl Makefile.PL INSTALLDIRS=perl +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} \; +find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null +%{_fixperms} %{buildroot} + +%check +make test TEST_FILES="t/*.t xt/*/*.t" + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc Changes LICENSE README +%{perl_privlib}/Perl/ +%{_mandir}/man3/Perl::OSType.3pm* + +%changelog +* Wed Jan 26 2011 Paul Howarth <paul@xxxxxxxxxxxx> - 1.002-3 +- BR: perl(constant), perl(Exporter), perl(File::Temp) in case they are + dual-lived at some point (#672801) + +* Wed Jan 26 2011 Paul Howarth <paul@xxxxxxxxxxxx> - 1.002-2 +- Sanitize for Fedora submission + +* Tue Jan 25 2011 Paul Howarth <paul@xxxxxxxxxxxx> - 1.002-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..c15e687 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +73be06de32cd51cf5e6de37b5725e0ac Perl-OSType-1.002.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel