App-CPANtoRPM

 view release on metacpan or  search on metacpan

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

            #
            # PM files:
            #   **/*.pm
            #
            # Bin files
            #   bin/*
            #   script/*
            #
            # man1 files:
            #   man1/*
            #   bindoc/*
            #
            # man3 files:
            #   man3/*
            #   libdoc/*

            if      ($f =~ /\.exists$/) {
               next;

            } elsif ($f =~ m,^lib/\Q$ARCH\E/.*\.pm$,  ||
                     $f =~ m,^arch/auto/.*\.pm$,) {

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

            } elsif ($f =~ m,^lib/\Q$ARCH\E/.*\.so$,  ||
                     $f =~ m,^arch/auto/.*\.so$,) {
               $package{'instfiles'}{'lib'}{$f}     = 1;
               $package{'arch_inst'}                = 1;

            } elsif ($f =~ m,^(script|bin)/,) {
               $package{'instfiles'}{'scripts'}{$f} = 1;
               $package{'bin_inst'}                 = 1;

            } elsif ($f =~ m,^man1/,  ||
                     $f =~ m,^bindoc/,) {
               $package{'instfiles'}{'man1'}{$f}    = 1;
               $package{'man1_inst'}                = 1;

            } elsif ($f =~ m,^man3/,  ||
                     $f =~ m,^libdoc/,) {
               $package{'instfiles'}{'man3'}{$f}    = 1;
               $package{'man3_inst'}                = 1;
            }

         } else {

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

         if      ($insttype eq 'perl') {
            $package{'lib_dir'}  = '%{perl_privlib}';
            $package{'arch_dir'} = '%{perl_archlib}';
         } elsif ($insttype eq 'site') {
            $package{'lib_dir'}  = '%{perl_sitelib}';
            $package{'arch_dir'} = '%{perl_sitearch}';
         } else {
            $package{'lib_dir'}  = '%{perl_vendorlib}';
            $package{'arch_dir'} = '%{perl_vendorarch}';
         }
         $package{'bin_dir'}  = '%{_bindir}';
         $package{'man1_dir'} = '%{_mandir}/man1';
         $package{'man3_dir'} = '%{_mandir}/man3';

         if ($type eq 'build') {

            if ($t eq 'perl') {
               push(@config_cmd,
                    "--installdirs core");
            } else {
               push(@config_cmd,
                    "--installdirs $t");
            }

            push(@config_cmd,
                 "--install_path script=%{_bindir}",
                 "--install_path bin=%{_bindir}",
                 "--install_path libdoc=%{_mandir}/man3",
                 "--install_path bindoc=%{_mandir}/man1",
                );

         } else {

            if ($t eq 'perl') {
               push(@config_cmd,
                    "INSTALLDIRS=perl",
                    "INSTALLBIN=%{_bindir}",
                    "INSTALLSCRIPT=%{_bindir}",
                    "INSTALLMAN1DIR=%{_mandir}/man1",
                    "INSTALLMAN3DIR=%{_mandir}/man3",
                   );
            } else {
               push(@config_cmd,
                    "INSTALLDIRS=$t",
                    "INSTALL${T}BIN=%{_bindir}",
                    "INSTALL${T}SCRIPT=%{_bindir}",
                    "INSTALL${T}MAN1DIR=%{_mandir}/man1",
                    "INSTALL${T}MAN3DIR=%{_mandir}/man3",
                    "INSTALLSCRIPT=%{_bindir}",       # necessary due to a bug
                   );
            }
         }

         last DIR_ARGS;
      }

      # If we're installing in an alternate location, we have made
      # sure to always pass in $insttype.

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


         if ($type eq 'build') {
            if ($t eq 'perl') {
               push(@config_cmd,
                    "--installdirs core",
                    "--install_path arch=$d/lib/perl5/$VERS/$ARCH",
                    "--install_path lib=$d/lib/perl5/$VERS",
                    "--install_path script=$d/bin",
                    "--install_path bin=$d/bin",
                    "--install_path libdoc=$d/$MAN/man3",
                    "--install_path bindoc=$d/$MAN/man1",
                   );

            } else {
               push(@config_cmd,
                    "--installdirs $t",
                    "--install_path arch=$d/lib/perl5/${t}_perl/$VERS/$ARCH",
                    "--install_path lib=$d/lib/perl5/${t}_perl/$VERS",
                    "--install_path script=$d/bin",
                    "--install_path bin=$d/bin",
                    "--install_path libdoc=$d/$MAN/man3",
                    "--install_path bindoc=$d/$MAN/man1",
                   );
            }

         } else {
            if ($t eq 'perl') {
               push(@config_cmd,
                    "INSTALLDIRS=perl",
                    "PERLPREFIX=$d",
                    "INSTALLARCHLIB=$d/lib/perl5/$VERS/$ARCH",
                    "INSTALLPRIVLIB=$d/lib/perl5/$VERS",



( run in 2.198 seconds using v1.01-cache-2.11-cpan-2398b32b56e )