Alien-premake5

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

  build sub {
    my ($build) = @_;

    my $executable = 'premake5' . ($source eq 'windows' ? '.exe' : '');
    my $binary = ($source eq 'src')
      ? build_from_source($build, $executable)
      : Path::Tiny::path( $build->install_prop->{extract} )
          ->child($executable);

    # premake5 makefiles do not define an install target
    my $bindir = Path::Tiny::path( $build->install_prop->{prefix}, 'bin' );
    $bindir->mkpath;

    my $target = $bindir->child($executable);

    $binary->copy($target);
    $target->chmod(0755);

    $build->runtime_prop->{command} = $target->basename;
  };
};

requires 'Capture::Tiny';



( run in 1.548 second using v1.01-cache-2.11-cpan-2398b32b56e )