PageRenderTime 57ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/Build.PL

https://bitbucket.org/Mekk/perl-keyring-pwsafe3
Perl | 75 lines | 65 code | 7 blank | 3 comment | 0 complexity | 8d64f06046d1de54dd8bf82b1dd80245 MD5 | raw file
  1. use 5.006;
  2. use strict;
  3. use warnings;
  4. use Module::Build;
  5. # Generate also README.md
  6. # Testing: ./Build.PL; ./Build distmeta
  7. # (alternatively we could override ACTION_distmeta, but this seems nicer)
  8. my $class = Module::Build->subclass(
  9. class => 'MEKK::Module::Build',
  10. code => q{
  11. sub do_create_readme {
  12. my $self = shift;
  13. $self->SUPER::do_create_readme; # Default
  14. my $docfile = $self->_main_docfile or return; # Warning already emitted
  15. require Pod::Readme; require Pod::Markdown;
  16. $self->log_info("Creating README.md\n");
  17. my $parser = Pod::Readme->new(
  18. input_file => $docfile,
  19. translate_to_file => 'README.md',
  20. translation_class => 'Pod::Markdown');
  21. $parser->run;
  22. $self->_add_to_manifest('MANIFEST', 'README.md');
  23. }
  24. }
  25. );
  26. my $builder = $class->new(
  27. module_name => 'Passwd::Keyring::PWSafe3',
  28. license => 'perl',
  29. dynamic_config => 1,
  30. build_requires => {
  31. 'Module::Build' => '0.36',
  32. 'Test::More' => 0,
  33. 'Test::Pod::Coverage' => '1.0',
  34. 'Pod::Readme' => '1.001002',
  35. 'Pod::Markdown' => '2.0',
  36. },
  37. configure_requires => {
  38. 'Module::Build' => '0.36',
  39. },
  40. requires => {
  41. 'perl' => 5.009002, # pack(W) in Crypt::PWSafe3, http://search.cpan.org/~rgarcia/perl-5.9.2/pod/perl592delta.pod#Packing_and_UTF-8_strings
  42. 'Crypt::PWSafe3' => '1.15', # 1.07 fixes huge performance problems, 1.11 fixes pack errors reported when password expire is set (I have such in my tests) but has quirks fixed in 1.12, 1.15 fixes corner-case tempfile problems
  43. 'Bytes::Random::Secure' => '0.09', # performance fix works only when this module is present, without it PWSafe3 is very slow
  44. 'Term::ReadKey' => 0, # for interactive password prompts
  45. 'File::HomeDir' => 0,
  46. },
  47. recommends => {
  48. 'Math::Random::ISAAC::XS' => 0, # makes Bytes::Random::Secure faster
  49. },
  50. share_dir => {
  51. dist => [ 'example' ],
  52. },
  53. create_makefile_pl => 'traditional',
  54. add_to_cleanup => [ 'Passwd-Keyring-PWSafe3-*' ],
  55. create_readme => 1,
  56. dist_author => q{Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>},
  57. dist_version_from => 'lib/Passwd/Keyring/PWSafe3.pm',
  58. meta_merge => {
  59. keywords => [ qw/ passwords security secure-storage keyring KDE PWSafe3 / ],
  60. resources => {
  61. license => 'http://dev.perl.org/licenses/',
  62. homepage => 'http://bitbucket.org/Mekk/perl-keyring-pwsafe3',
  63. repository => 'http://bitbucket.org/Mekk/perl-keyring-pwsafe3',
  64. bugtracker => 'https://bitbucket.org/Mekk/perl-keyring-pwsafe3/issues',
  65. },
  66. },
  67. );
  68. $builder->create_build_script();