Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Item14152: EmptyExtension should be installable
Add the MANIFEST and sample Config.spec Update pseudo-install.pl to process an Extension like a Contrib.
- Loading branch information
Showing
6 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
EmptyExtension/lib/Foswiki/Extension/EmptyExtension/Config.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ---+ Extensions | ||
# ---++ %$MODULE% | ||
1; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
!noci | ||
lib/Foswiki/Extension/Empty.pm 0444 Perl module |
76 changes: 76 additions & 0 deletions
76
EmptyExtension/lib/Foswiki/Extension/EmptyExtension/build.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/perl -w | ||
# | ||
# Example build class. Copy this file to the equivalent place in your | ||
# plugin or contrib and edit. | ||
# | ||
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for | ||
# details of how the build process works, and what files you | ||
# have to provide and where. | ||
# | ||
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path | ||
# list) to be set to point at the build system and any required dependencies. | ||
# Usage: ./build.pl [-n] [-v] [target] | ||
# where [target] is the optional build target (build, test, | ||
# install, release, uninstall), test is the default. | ||
# Two command-line options are supported: | ||
# -n Don't actually do anything, just print commands | ||
# -v Be verbose | ||
# | ||
|
||
# Standard preamble | ||
use strict; | ||
use warnings; | ||
|
||
BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); } | ||
|
||
use Foswiki::Contrib::Build; | ||
|
||
# Create the build object | ||
my $build = new Foswiki::Contrib::Build('EmptyExtension'); | ||
|
||
# Build the target on the command line, or the default target | ||
$build->build( $build->{target} ); | ||
|
||
=begin TML | ||
You can do a lot more with the build system if you want; for example, to add | ||
a new target, you could do this: | ||
<verbatim> | ||
{ | ||
package MyModuleBuild; | ||
our @ISA = qw( Foswiki::Contrib::Build ); | ||
sub new { | ||
my $class = shift; | ||
return bless( $class->SUPER::new( "MyModule" ), $class ); | ||
} | ||
sub target_mytarget { | ||
my $this = shift; | ||
# Do other build stuff here | ||
} | ||
} | ||
# Create the build object | ||
my $build = new MyModuleBuild(); | ||
</verbatim> | ||
You can also specify a different default target server for uploads. | ||
This can be any web on any accessible Foswiki installation. | ||
These defaults will be used when expanding tokens in .txt | ||
files, but be warned, they can be overridden at upload time! | ||
<verbatim> | ||
# name of web to upload to | ||
$build->{UPLOADTARGETWEB} = 'Extensions'; | ||
# Full URL of pub directory | ||
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub'; | ||
# Full URL of bin directory | ||
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin'; | ||
# Script extension | ||
$build->{UPLOADTARGETSUFFIX} = ''; | ||
</verbatim> | ||
=cut | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters