Build.PL 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. use utf8;
  2. use 5.010;
  3. use strict;
  4. use warnings;
  5. use Module::Build;
  6. my $gtk3 = grep { /^--?gtk3?\z/ } @ARGV;
  7. my $builder = Module::Build->new(
  8. module_name => 'WWW::YoutubeViewer',
  9. license => 'perl',
  10. dist_author => q{Trizen <echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>},
  11. dist_version_from => 'lib/WWW/YoutubeViewer.pm',
  12. release_status => 'stable',
  13. build_requires => {
  14. 'Test::More' => 0,
  15. },
  16. extra_manify_args => {utf8 => 1},
  17. configure_requires => {
  18. 'Module::Build' => 0,
  19. },
  20. get_options => {
  21. 'gtk3' => {
  22. type => '!',
  23. store => \$gtk3,
  24. },
  25. },
  26. requires => {
  27. 'perl' => 5.016,
  28. 'Data::Dump' => 0,
  29. 'File::Spec' => 0,
  30. 'File::Spec::Functions' => 0,
  31. 'File::Path' => 0,
  32. 'Getopt::Long' => 0,
  33. 'HTTP::Request' => 0,
  34. 'JSON' => 0,
  35. 'Encode' => 0,
  36. 'Memoize' => 0,
  37. 'MIME::Base64' => 0,
  38. 'List::Util' => 0,
  39. 'LWP::UserAgent' => 0,
  40. 'LWP::Protocol::https' => 0,
  41. 'Term::ANSIColor' => 0,
  42. 'Term::ReadLine' => 0,
  43. 'Text::ParseWords' => 0,
  44. 'Text::Wrap' => 0,
  45. 'URI::Escape' => 0,
  46. $gtk3
  47. ? (
  48. 'Gtk3' => 0,
  49. 'File::ShareDir' => 0,
  50. 'Storable' => 0,
  51. 'Digest::MD5' => 0,
  52. )
  53. : (),
  54. },
  55. recommends => {
  56. 'LWP::UserAgent::Cached' => 0, # cache support
  57. 'Term::ReadLine::Gnu' => 0, # for better STDIN support (+history)
  58. 'JSON::XS' => 0, # faster JSON to HASH conversion
  59. 'Unicode::GCString' => 0, # fixed-width format
  60. 'Text::Unidecode' => 0, # for the `fat32safe` option
  61. },
  62. add_to_cleanup => ['WWW-YoutubeViewer-*'],
  63. create_makefile_pl => 'traditional',
  64. );
  65. $builder->script_files(['bin/youtube-viewer', ($gtk3 ? ('bin/gtk-youtube-viewer') : ())]);
  66. $builder->share_dir('share') if $gtk3;
  67. $builder->create_build_script();