Name: perl-MooseX-App-Cmd Version: 0.04 Release: 2%{?dist} # see lib/MooseX/App/Cmd.pm License: GPL+ or Artistic Group: Development/Libraries Summary: Mashes up MooseX::Getopt and App::Cmd Source: http://search.cpan.org/CPAN/authors/id/D/DM/DMAKI/MooseX-App-Cmd-%{version}.tar.gz Url: http://search.cpan.org/dist/MooseX-App-Cmd BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(App::Cmd) BuildRequires: perl(Getopt::Long::Descriptive) BuildRequires: perl(Moose) BuildRequires: perl(MooseX::Getopt) >= 0.09 BuildRequires: perl(MooseX::ConfigFromFile) # testing BuildRequires: perl(YAML) BuildRequires: perl(Test::More) BuildRequires: perl(Test::use::ok) # we don't pick up Moose keywords automagically yet Requires: perl(App::Cmd) Requires: perl(App::Cmd::Command) Requires: perl(MooseX::Getopt) >= 0.09 Requires: perl(MooseX::ConfigFromFile) %description This module marries App::Cmd with MooseX::Getopt. Use it like the App::Cmd manpage advises (especially see the App::Cmd::Tutorial manpage), swapping App::Cmd::Command for MooseX::App::Cmd::Command. Then you can write your commands as Moose classes, with the MooseX::Getopt defining the options for you instead of 'opt_spec' returning a Getopt::Long::Descriptive spec. %prep %setup -q -n MooseX-App-Cmd-%{version} perl -pi -e 's|^#!perl|#!/usr/bin/perl|' t/*.t # make sure doc/tests don't generate provides # note we first filter out the bits in _docdir... cat << \EOF > %{name}-prov #!/bin/sh %{__perl_provides} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'` EOF %define __perl_provides %{_builddir}/MooseX-App-Cmd-%{version}/%{name}-prov chmod +x %{__perl_provides} cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'` EOF %define __perl_requires %{_builddir}/MooseX-App-Cmd-%{version}/%{name}-req chmod +x %{__perl_requires} %build %{__perl} Makefile.PL INSTALLDIRS=vendor 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} -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} %{buildroot}/* %check make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes t/ %{perl_vendorlib}/* %{_mandir}/man3/*.3* %changelog * Wed Nov 05 2008 Chris Weyl 0.04-2 - I swear I fixed those "manpage" references... * Wed Nov 05 2008 Chris Weyl 0.04-1 - update for submission * Mon Oct 27 2008 Chris Weyl 0.04-0.1 - initial RPM packaging - generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.5)