Name: perl-Term-Size Version: 0.2 Release: 1%{?dist} # see Copyright License: GPL+ or Artistic Group: Development/Libraries Summary: Simple way to get terminal size Source: http://search.cpan.org/CPAN/authors/id/T/TI/TIMPX/Term-Size-%{version}.tar.gz Url: http://search.cpan.org/dist/Term-Size BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # see http://rt.cpan.org/Public/Bug/Display.html?id=38594 Patch0: rt38594.perlio.patch BuildRequires: perl(ExtUtils::MakeMaker) %description *Term::Size* is a Perl module which provides a straightforward way to retrieve the terminal size. Both functions take an optional filehandle argument, which defaults to '*STDIN{IO}'. They both return a list of two values, which are the current width and height, respectively, of the terminal associated with the specified filehandle. 'Term::Size::chars' returns the size in units of characters, whereas 'Term::Size::pixels' uses units of pixels. %prep %setup -q -n Term-Size-%{version} %patch0 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} %{buildroot}/* %check # tests will fail under mock (no terminal size to get!) In particular, tests # 2, 3 and 5 fail regardless of what platform they're being complied for under # mock. %{?_with_display_tests: make test } %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes README Copyright test.pl %{perl_vendorarch}/* %exclude %dir %{perl_vendorarch}/auto %{_mandir}/man3/*.3* %changelog * Mon Sep 29 2008 Chris Weyl 0.2-1 - initial RPM packaging - generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.1)