NAME

proj-template - Helps in the setting up of a project

simple-proj - a tool to setup basic projects


SYNOPSIS

proj-template [-hr] [-d dir] [-x template] [-C config]

simple-proj [-hr] [-d dir] [-x template] [-C config]


DESCRIPTION

These are a pair of simple scripts designed to aid in the setting of a project. The two tools are:

  simple-proj
  proj-template

simple-proj

simple-proj is the simpler of the two scripts. All it does is to create the directory InstallPackage in the current working directory and copy the contents of its source directory - by default /usr/local/lib/pkg-tools/simple-proj - into it.

proj-template

proj-template is the more complex of the two scripts. It performs the following actions:


OPTIONS

Supported options are:

proj-template [-hr] [-d dir] [-x template] [-C config]

simple-proj [-hr] [-d dir] [-x template] [-C config]

Note that the options for both commands have the same action.

-h
The help

-r
Normally questions are asked before a file is over-written in the current working directory. This option removes the asking of the question; the file will thus be over-written automatically

-d dir
Configure the template directory. The defaults are:
  proj-template: /usr/local/lib/pkg-tools/templates
  simple-proj  : /usr/local/lib/pkg-tools/simple-proj

-x template
The actual template being used. This allows a developer to have project specific templates copied in to place. The default is std.

The proj-template directory has a number of templates available; these include:

  std  - Standard template based around the use of GNU autoconf
  perl - Template for a perl module
  orig - Original template, here for historical reasons

The simple-proj directory has a number of templates available; these include:

  std  - Puts postinstall and postremove scripts into place
         which re-build the manual page indexes. This is the
         default template.
  perl - Puts a depend file into place which gives the package
         a dependancy on the perl package; PLcore in this case.
  gtk  - Puts a depend file into place which gives the package
         a dependancy on the GTK and gLib packages. In this
         case the package names are GTKcore and GTKglib
         respectfully. It also postinstall and preremove scripts
         which rebuild the manual page indexes into place.

Note that if you state the template as `?' then a list of available templates is returned, i.e. for simple-proj:

  % simple-proj -x ?
  gtk
  perl
  std
  %

And for proj-template:

  % proj-template -x ?
  perl
  orig
  std
  %

-C config
The configuration file to use. proj-template and simple-proj both use the same configuration file as build-pkg. Thus it follows the same rules. The details below are really the ones for build-pkg!

By default we look in $HOME/.build-pkg for the configuration. This file has a relatively simple format. Lines starting with a # or which are blank (no characters or all spaces) are ignored. All other lines have the format of:

  key = value

Where valid keys are:

  +-------------+-----------------------------------------+
  |    Key      | Value should be...                      |
  +-------------+-----------------------------------------+
  | PkgPrefix   | Prefix to the package name              |
  | BaseDir     | The base directory                      |
  | PerlBaseDir | The base directory for perl modules     |
  | Category    | The category prefix                     |
  | Vendor      | Vendor name                             |
  | Class       | Class of package                        |
  | Email       | EMail address of package builder        |
  | Name        | Name of the package builder             |
  | WaitTime    | Time to wait after an error has occured |
  +-------------+-----------------------------------------+

The only important options above for proj-template are Email and Name


SUPPORTED MACROS

The following macros are supported:

%%PROJ_NAME%%
The name of the project

%%UPPER_PROJ_NAME%%
The name of the project, but all in upper case

%%YYYY@
The current year

%%DESC%%
The one line project description

%%NAME%%
The name of the project owner

%%PROJ_VERSION%%
The version number of the project

%%TAGLINE%%
This macro is a combination of the %%UPPER_PROJ_NAME%% and %%PROJ_VERSION%% macros with a space and a ``v'' between the two, i.e.:

%%UPPER_PROJ_NAME%% v%%PROJ_VERSION%%

%%EMAIL%%
The EMail address of the author


SEE ALSO

build-pkg(1)


BUGS

None known as yet


AUTHOR

Simon Burr <simes@bpfh.net>


LICENSE

Copyright (c) 2002, Simon Burr <simes@bpfh.net> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer. 
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution. 
  * Neither the name of the author nor the names of its contributors may
    be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.