Changeset 17072 for trunk/Nebulous-Server/Build.PL
- Timestamp:
- Mar 20, 2008, 11:13:28 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/Build.PL (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/Build.PL
r16565 r17072 2 2 # See perldoc Module::Build for details of how this works 3 3 4 my $build_pkg = eval { require Apache::TestMB } 5 ? 'Apache::TestMB' 6 : 'Module::Build'; 7 8 my $class = $build_pkg->subclass(code => <<'EOF'); 9 use Cwd; 10 11 my $pkg_dir = "./nebclient"; 12 13 sub ACTION_code { 14 my $self = shift; 15 16 $self->SUPER::ACTION_code(@_); 17 18 my $old_pwd = getcwd(); 19 chdir $pkg_dir; 20 21 unless (-e "configure") { 22 system("./autogen.sh") == 0 or die "install failed: $?"; 23 } 24 25 chdir $old_pwd; 26 } 27 28 sub ACTION_build { 29 my $self = shift; 30 31 $self->SUPER::ACTION_build(@_); 32 33 my $old_pwd = getcwd(); 34 chdir $pkg_dir; 35 36 unless (-e "Makefile") { 37 system("sh ./configure") == 0 or die "build failed: $?"; 38 } 39 40 system("make") == 0 or die "build failed: $?"; 41 42 chdir $old_pwd; 43 } 44 45 # Do not attempt to install nebclient. It is bundled in this package for 46 # testing only. 47 # 48 # sub ACTION_install { 49 # my $self = shift; 50 # 51 # $self->SUPER::ACTION_install(@_); 52 # 53 # my $old_pwd = getcwd(); 54 # chdir $pkg_dir; 55 # 56 # system("make install") == 0 or die "install failed: $?"; 57 # 58 # chdir $old_pwd; 59 # } 60 61 sub ACTION_clean { 62 my $self = shift; 63 64 $self->SUPER::ACTION_clean(@_); 65 66 my $old_pwd = getcwd(); 67 chdir $pkg_dir; 68 69 system("make clean") == 0 or die "install failed: $?"; 70 71 chdir $old_pwd; 72 } 73 EOF 74 75 $class->new( 4 Module::Build->new( 76 5 module_name => 'Nebulous', 77 6 dist_version_from => 'lib/Nebulous/Server.pm', … … 80 9 create_makefile_pl => 'passthrough', 81 10 requires => { 11 'Apache2::Const' => 0, 82 12 'Class::Accessor::Fast' => 0, 83 13 'Config::YAML' => '1.42', … … 89 19 'File::Spec' => 0, 90 20 'File::Spec::Functions' => 0, 21 'File::Temp' => 0, 91 22 'Log::Log4perl' => '0.48', 92 23 'Net::Server::Daemonize'=> '0.05', … … 97 28 }, 98 29 build_requires => { 99 'Apache2::SOAP' => 0,100 'Apache::DBI' => '1.05',101 'Apache::Test' => '1.27', # bundles Apache::TestMB102 'Apache::TestMB' => 0,103 'File::Temp' => 0,104 30 'Test::More' => '0.49', 105 31 'Test::URI' => '1.06', … … 107 33 recommends => { 108 34 'Test::Distribution' => '1.22', 35 'Apache2::SOAP' => 0, 36 'Apache::DBI' => '1.05', 109 37 }, 110 38 script_files => [qw( 111 39 bin/neb-addvol 112 bin/neb-cat113 bin/neb-cp114 bin/neb-cull115 bin/neb-df116 40 bin/neb-fsck 117 41 bin/neb-initdb 118 bin/neb-locate119 bin/neb-ls120 bin/neb-mv121 bin/neb-replicate122 bin/neb-rm123 bin/neb-stat124 bin/neb-touch125 42 bin/nebdiskd 126 43 )],
Note:
See TracChangeset
for help on using the changeset viewer.
