forked from trizen/youtube-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.PL
executable file
·114 lines (97 loc) · 3.41 KB
/
Build.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/perl
use utf8;
use 5.010;
use strict;
use warnings;
use Module::Build;
my $gtk = grep { /^--?gtk\z/ } @ARGV;
my $gtk2 = grep { /^--?gtk2\z/ } @ARGV;
my $gtk3 = grep { /^--?gtk3\z/ } @ARGV;
my $builder = Module::Build->new(
module_name => 'WWW::YoutubeViewer',
license => 'perl',
dist_author => q{Trizen <echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>},
dist_version_from => 'lib/WWW/YoutubeViewer.pm',
release_status => 'stable',
build_requires => {
'Test::More' => 0,
},
configure_requires => {
'Module::Build' => 0,
},
get_options => {
'gtk' => {
type => '!',
store => \$gtk,
},
'gtk2' => {
type => '!',
store => \$gtk2,
},
'gtk3' => {
type => '!',
store => \$gtk3,
},
},
requires => {
'perl' => 5.016,
'Data::Dump' => 0,
'File::Spec' => 0,
'File::Spec::Functions' => 0,
'File::Path' => 0,
'Getopt::Long' => 0,
'HTTP::Request' => 0,
'JSON' => 0,
'Encode' => 0,
'MIME::Base64' => 0,
'List::Util' => 0,
'LWP::UserAgent' => 0,
'LWP::Protocol::https' => 0,
'Term::ANSIColor' => 0,
'Term::ReadLine' => 0,
'Text::ParseWords' => 0,
'Text::Wrap' => 0,
'URI::Escape' => 0,
($gtk || $gtk2)
? (
'Gtk2' => 0,
'File::ShareDir' => 0,
)
: (),
$gtk3
? (
'Gtk3' => 0,
'File::ShareDir' => 0,
'Storable' => 0,
'Digest::MD5' => 0,
'List::Util' => 1.43,
)
: (),
},
recommends => {
'LWP::UserAgent::Cached' => 0, # cache support
'Term::ReadLine::Gnu::XS' => 0, # for better STDIN support
'JSON::XS' => 0, # faster JSON to HASH conversion
'Mozilla::CA' => 0, # just in case if there are SSL problems
},
auto_features => {
fixed_width_support => {
description => "Print the results in a fixed-width format (--fixed-width, -W)",
requires => {
'Unicode::GCString' => 0, # this is recommended
#'Text::CharWidth' => 0, # this works as fallback
},
},
},
add_to_cleanup => ['WWW-YoutubeViewer-*'],
create_makefile_pl => 'traditional',
);
$builder->script_files(
['bin/youtube-viewer',
($gtk ? ('bin/gtk-youtube-viewer', 'bin/gtk2-youtube-viewer', 'bin/gtk3-youtube-viewer') : ()),
($gtk2 ? ('bin/gtk-youtube-viewer', 'bin/gtk2-youtube-viewer') : ()),
($gtk3 ? ('bin/gtk-youtube-viewer', 'bin/gtk3-youtube-viewer') : ()),
]
);
$builder->share_dir('share') if ($gtk || $gtk2 || $gtk3);
$builder->create_build_script();