App-CPANtoRPM

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    In order to install the package, you either must be running as root, or
    have the sudo program. The sudo command may be interactive, depending on
    how you have it set up.

    In order to install RPMs in a yum repository, the repository must exist.

HISTORY
    This script is based loosely on Erick Calder's cpan2rpm script and
    Steven Pritchard's cpanspec script. Initially, I set out to modify one
    or the other of them, but I found that the modifications that I felt
    necessary were extensive enough that I decided a fresh implementation
    was both faster and cleaner.

    cpan2rpm
        cpan2rpm had basically the full functionality that I wanted. It
        would download a module, write a spec file for it, create an RPM,
        and then install it. The only functionality that was missing was
        some simple functionality to add it to a local yum repository. That
        would have been very simple to add. However, it suffered from
        several other significant problems.

README  view on Meta::CPAN

        parse them is to actually use the perl interpreter. Although most
        modern modules include Makefile.PL or Build.PL scripts that follow
        certain conventions, it is by no means guaranteed, so I was not
        satisfied with this assumption.

        As with cpan2rpm, cpanspec does not deal with interactive installs.
        It simply shuffles the problem to another location. In this case,
        once the SPEC file is created, it is necessary to run rpmbuild, and
        this will hang.

    Due to the weaknesses in both of the existing alternatives, I decided a
    clean rewrite was in order. The goals were:

    Beginning-to-end functionality
        cpantorpm will download the module from CPAN, create the SPEC file,
        generate an RPM, install it, and store the RPM in a local YUM
        repository for other hosts to use.

    Cross platform
        cpantorpm will work on any RPM based distribution (though this is
        only tested on redhat and OpenSuSE to date). Also, many of the steps

bin/cpantorpm.pod  view on Meta::CPAN

have the B<sudo> program.  The B<sudo> command may be interactive,
depending on how you have it set up.

In order to install RPMs in a yum repository, the repository must exist.

=head1 HISTORY

This script is based loosely on Erick Calder's cpan2rpm script and
Steven Pritchard's cpanspec script.  Initially, I set out to modify
one or the other of them, but I found that the modifications that I
felt necessary were extensive enough that I decided a fresh
implementation was both faster and cleaner.

=over 4

=item cpan2rpm

cpan2rpm had basically the full functionality that I wanted.  It would
download a module, write a spec file for it, create an RPM, and then
install it.  The only functionality that was missing was some simple
functionality to add it to a local yum repository.  That would have been

bin/cpantorpm.pod  view on Meta::CPAN

certain conventions, it is by no means guaranteed, so I was not
satisfied with this assumption.

As with cpan2rpm, cpanspec does not deal with interactive installs.  It
simply shuffles the problem to another location.  In this case, once
the SPEC file is created, it is necessary to run rpmbuild, and this
will hang.

=back

Due to the weaknesses in both of the existing alternatives, I decided
a clean rewrite was in order.  The goals were:

=over 4

=item Beginning-to-end functionality

cpantorpm will download the module from CPAN, create the SPEC file,
generate an RPM, install it, and store the RPM in a local YUM repository
for other hosts to use.

lib/App/CPANtoRPM.pm  view on Meta::CPAN

         }
      }
   }

   # If we are doing an arch install, then turn off the noarch lib_inst
   if ($package{'arch_inst'}) {
      $package{'lib_inst'}=0;
   }

   #
   # We need to decide (if possible) which is the 'main' pod file.
   #
   # This only has to be done once (at the post_build step).
   #

   return  if ($op ne 'post_build');

   # Scripts and .pm files may also be pod.

   $package{'files'}{'pm'}      = {}  if (! exists $package{'files'}{'pm'});
   $package{'files'}{'scripts'} = {}  if (! exists $package{'files'}{'scripts'});



( run in 1.252 second using v1.01-cache-2.11-cpan-de7293f3b23 )