Alien-7zip

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

      qw(-f makefile.gcc),
      "O=$output_dir",
      ( $^O eq 'MSWin32' ? ('IS_MINGW=1') : () ),
    ],
    sub {
      my ($build) = @_;
      my $prefix = Path::Tiny::path($build->install_prop->{prefix});
      my $output = Path::Tiny::path($build_dir, $output_dir);

      my $prefix_bin_name = $prefix->child('bin', $bin_name);
      $prefix_bin_name->parent->mkpath;
      File::Copy::Recursive::fcopy($output->child($bin_name), $prefix_bin_name);
    }
  ];
  after build => sub {
    my($build) = @_;
    $build->runtime_prop->{'style'} = 'source';
    if( $^O ne 'MSWin32' ) {
      # on Unix-likes (linux, darwin)
      $build->runtime_prop->{command} = '7zz';
    } else {

alienfile  view on Meta::CPAN


    patch sub {
      my $cwd = Path::Tiny->cwd;
      $_->remove for $cwd->children( qr/\.msi$/ );
      my $_7zip = $cwd->child('Files/7-Zip');
      $_->remove for $_7zip->children( qr/\.chm$|History\.txt|readme\.txt/ );
      my $bin_dir = $cwd->child('bin');
      $bin_dir->mkpath;
      File::Copy::Recursive::rmove( "$_7zip/*", $bin_dir );
      $_7zip->remove_tree;
      $_7zip->parent->remove_tree unless $_7zip->parent->children;
    };
    plugin 'Build::Copy';
    after build => sub {
      my($build) = @_;
      $build->runtime_prop->{'style'} = 'binary';
      # on MSWin32
      $build->runtime_prop->{command} = '7z.exe';
    };
  } elsif( $binary_release_format eq '.tar.xz' ) {
    plugin Extract => 'tar.xz';



( run in 0.350 second using v1.01-cache-2.11-cpan-4d50c553e7e )