File: Build.PL

package info (click to toggle)
libsvn-notify-mirror-perl 0.04000-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 292 kB
  • ctags: 32
  • sloc: perl: 1,167; makefile: 4
file content (71 lines) | stat: -rw-r--r-- 1,961 bytes parent folder | download | duplicates (2)
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
use Module::Build;
# See perldoc Module::Build for details of how this works

my $class = Module::Build->subclass
(
    class => 'JPEACOCK::Builder',
    code => q{
	sub ACTION_dist{
	    my $self = shift;
	    $self->do_system('hg log -b default --style changelog > Changes');
	    $self->SUPER::ACTION_dist();
	}
    }
);

my $mb = $class->new
    ( module_name     => 'SVN::Notify::Mirror',
      license         => 'perl',
      dist_author     => 'John Peacock <jpeacock@cpan.org>',
      configure_requires => { 'Module::Build' => 0.38 },
      requires        => {
	  'Module::Build' => 0.38,
	  'SVN::Notify'   => 2.83,
	  'YAML'          => 0.81,
      },
      auto_features   => {
	  ssh_support => { 
	      description => "Use remote mirrors via ssh",
	      requires    => {Net::SSH => 0.08 }
	  },
	  config_support => {
	      description => "Use compact YAML script",
	      requires    => {SVN::Notify::Config => 0.0906}
	  },
	  rsync_support => {
	      description => "Transfer files with rsync",
	      requires    => {File::Rsync => 0.42}
	  },
      },
      PL_files => { 
	  't/002_config.t.PL' =>
	      ['t/testconfig','t/002_config.t','t/002_config'],
	  't/003_sshtest.t.PL' => 't/003_sshtest.t',
	  't/004_rsynctest.t.PL' => 't/004_rsynctest.t',
      },
      add_to_cleanup =>
	  ['t/test-repos', 't/wc-*', 't/00[2-4]*.t'],
    );

if ( $mb->feature('ssh_support') ) {
    $mb->notes( sshtests => 1 ) if
    	$mb->y_n(
    "Do you want to run the SSH tests?\n".
    "(see the README for details)",'N');
}

if ( $mb->feature('rsync_support') ) {
    $mb->notes( rsynctests => 1 ) if
    	$mb->y_n(
    "Do you want to run the rsync tests?\n".
    "(see the README for details)",'N');
    	
    if ( $mb->notes('sshtests') && $mb->notes('rsynctests') ) {
	$mb->notes( rsyncsshtests => 1 ) if
	    $mb->y_n(
	"Do you want to run the rsync tests via SSH?\n".
	"(see the README for details)",'N');
    }
}

$mb->create_build_script;