IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 20, 2008, 11:13:28 AM (18 years ago)
Author:
jhoblitt
Message:

server/client split

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Build.PL

    r16565 r17072  
    22# See perldoc Module::Build for details of how this works
    33
    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(
     4Module::Build->new(
    765    module_name         => 'Nebulous',
    776    dist_version_from   => 'lib/Nebulous/Server.pm',
     
    809    create_makefile_pl  => 'passthrough',
    8110    requires            => {
     11        'Apache2::Const'        => 0,
    8212        'Class::Accessor::Fast' => 0,
    8313        'Config::YAML'          => '1.42',
     
    8919        'File::Spec'            => 0,
    9020        'File::Spec::Functions' => 0,
     21        'File::Temp'            => 0,
    9122        'Log::Log4perl'         => '0.48',
    9223        'Net::Server::Daemonize'=> '0.05',
     
    9728    },
    9829    build_requires      => {
    99         'Apache2::SOAP'         => 0,
    100         'Apache::DBI'           => '1.05',
    101         'Apache::Test'          => '1.27',  # bundles Apache::TestMB
    102         'Apache::TestMB'        => 0,
    103         'File::Temp'            => 0,
    10430        'Test::More'            => '0.49',
    10531        'Test::URI'             => '1.06',
     
    10733    recommends          => {
    10834        'Test::Distribution'    => '1.22',
     35        'Apache2::SOAP'         => 0,
     36        'Apache::DBI'           => '1.05',
    10937    },
    11038    script_files        => [qw(
    11139        bin/neb-addvol
    112         bin/neb-cat
    113         bin/neb-cp
    114         bin/neb-cull
    115         bin/neb-df
    11640        bin/neb-fsck
    11741        bin/neb-initdb
    118         bin/neb-locate
    119         bin/neb-ls
    120         bin/neb-mv
    121         bin/neb-replicate
    122         bin/neb-rm
    123         bin/neb-stat
    124         bin/neb-touch
    12542        bin/nebdiskd
    12643    )],
Note: See TracChangeset for help on using the changeset viewer.