1 rizwank 1.1 #!/usr/bin/perl -w
2 #
3 # Example build class. Copy this file to the equivalent place in your
4 # plugin and edit.
5 #
6 # Requires the environment variable TWIKI_SHARED to be
7 # set to point at the shared code repository
8 # Usage: ./build.pl [-n] [-v] [target]
9 # where [target] is the optional build target (build, test,
10 # install, release, uninstall), test is the default.`
11 # Two command-line options are supported:
12 # -n Don't actually do anything, just print commands
13 # -v Be verbose
14 #
15 # Read the comments at the top of lib/TWiki/Plugins/Build.pm for
16 # details of how the build process works, and what files you
17 # have to provide and where.
18 #
19 # Standard preamble
20 BEGIN {
21 use File::Spec;
22 rizwank 1.1 my $cwd = `dirname $0`; chop($cwd);
23 my $basedir = File::Spec->rel2abs("../../../..", $cwd);
24 die "TWIKI_SHARED not set" unless ($ENV{TWIKI_SHARED});
25 unshift @INC, "$ENV{TWIKI_SHARED}/lib";
26 unshift @INC, $basedir;
27 unshift @INC, $cwd;
28 }
29 use TWiki::Plugins::Build;
30
31 # Declare our build package
32 { package CommentPluginBuild;
33
34 @CommentPluginBuild::ISA = ( "TWiki::Plugins::Build" );
35
36 sub new {
37 my $class = shift;
38 return bless( $class->SUPER::new( "CommentPlugin" ), $class );
39 }
40 }
41
42 # Create the build object
43 rizwank 1.1 $build = new CommentPluginBuild();
44
45 # Build the target on the command line, or the default target
46 $build->build($build->{target});
47
|