Commit 95d071bc authored by lovedheart's avatar lovedheart Committed by Ed Reel

Create perl_module_build.rb (#1809)

parent f93275ff
require 'package'
class Perl_module_build < Package
description 'Module::Build - Build and install Perl modules'
homepage 'https://metacpan.org/pod/Module::Build'
version '0.4224'
source_url 'https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4224.tar.gz'
source_sha256 'a6ca15d78244a7b50fdbf27f85c85f4035aa799ce7dd018a0d98b358ef7bc782'
depends_on 'perl'
def self.build
end
def self.install
# install files to build directory
system 'cpanm', '-l', "build", '--self-contained', '.'
# install lib
libdir = `perl -e 'require Config; print $Config::Config{'"'installsitelib'"'};'`
system "mkdir -p #{CREW_DEST_DIR}#{libdir}"
system "(cd build/lib/perl5; tar cf - .) | (cd #{CREW_DEST_DIR}#{libdir}; tar xfp -)"
# install man
mandir = "#{CREW_PREFIX}/share/man"
system "mkdir -p #{CREW_DEST_DIR}#{mandir}"
system "(cd build/man; tar cf - .) | (cd #{CREW_DEST_DIR}#{mandir}; tar xfp -)"
end
def self.check
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment