Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item10549: scratched a long overdue itch by cleaning up the create_ne…
…w_extension script to be abe to create a new extension using an existing one as a template. Cleaned up the empty (default template) extensions which I was at it. git-svn-id: http://svn.foswiki.org/trunk/EmptyContrib@11239 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
CrawfordCurrie
authored and
CrawfordCurrie
committed
Mar 27, 2011
1 parent
4db0442
commit 2bfd47b
Showing
11 changed files
with
167 additions
and
113 deletions.
There are no files selected for viewing
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,26 @@ | ||
<!-- | ||
One line description, required for extensions repository catalog. | ||
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION% | ||
--> | ||
---+!! EmptyContrib | ||
|
||
%SHORTDESCRIPTION% | ||
|
||
%TOC% | ||
|
||
---++ Installation | ||
%$INSTALL_INSTRUCTIONS% | ||
|
||
---++ Info | ||
|
||
| Author: | %$AUTHOR% | | ||
| Copyright ©: | <!-- e.g. "2011, SlobSoft Gmbh, All Rights Reserved" --> | | ||
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | ||
| Dependencies: | %$DEPENDENCIES% | | ||
| Version: | %$VERSION% | | ||
| Change History: | <!-- versions below in reverse order --> | | ||
| 1.0.0 (XX Mmm 20XX): | Initial version | | ||
| Home: | http://foswiki.org/Extensions/%TOPIC% | | ||
| Support: | http://foswiki.org/Support/%TOPIC% | | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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,59 @@ | ||
# See bottom of file for default license and copyright information | ||
=begin TML | ||
---+ package Foswiki::Contrib::EmptyContrib | ||
This is a stub module for a new contrib. Customise this module as | ||
required. | ||
=cut | ||
|
||
# change the package name!!! | ||
package Foswiki::Contrib::EmptyContrib; | ||
|
||
# Always use strict to enforce variable scoping | ||
use strict; | ||
use warnings; | ||
|
||
# $VERSION is referred to by Foswiki, and is the only global variable that | ||
# *must* exist in this package. This should always be in the format | ||
# $Rev$ so that Foswiki can determine the checked-in status of the | ||
# extension. | ||
our $VERSION = '$Rev$'; | ||
|
||
# $RELEASE is used in the "Find More Extensions" automation in configure. | ||
# It is a manually maintained string used to identify functionality steps. | ||
# You can use any of the following formats: | ||
# tuple - a sequence of integers separated by . e.g. 1.2.3. The numbers | ||
# usually refer to major.minor.patch release or similar. You can | ||
# use as many numbers as you like e.g. '1' or '1.2.3.4.5'. | ||
# isodate - a date in ISO8601 format e.g. 2009-08-07 | ||
# date - a date in 1 Jun 2009 format. Three letter English month names only. | ||
# Note: it's important that this string is exactly the same in the extension | ||
# topic - if you use %$RELEASE% with BuildContrib this is done automatically. | ||
our $RELEASE = '1.0.0'; | ||
|
||
our $SHORTDESCRIPTION = 'One line description of the extension'; | ||
|
||
1; | ||
|
||
__END__ | ||
Foswiki - The Free and Open Source Wiki, http://foswiki.org/ | ||
Author: %$AUTHOR% | ||
Copyright (C) 2008-2011 Foswiki Contributors. Foswiki Contributors | ||
are listed in the AUTHORS file in the root of this distribution. | ||
NOTE: Please extend that file, not this notice. | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. For | ||
more details read LICENSE in the root of this distribution. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
As per the GPL, removal of this notice is prohibited. |
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 @@ | ||
# ---+ Extensions | ||
# ---++ EmptyContribPlugin |
File renamed without changes.
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,4 @@ | ||
!noci | ||
data/System/EmptyContrib.txt 0644 Documentation page | ||
lib/Foswiki/Contrib/EmptyContrib.pm Perl module | ||
lib/Foswiki/Contrib/EmptyContrib/Config.spec 0444 Configuration |
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,75 @@ | ||
#!/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('EmptyContrib'); | ||
|
||
# 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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