skip to main content

LCFG Build Tools : Creating a New Project

The easiest method for creating a new project which uses the LCFG build tools is to use the lcfg-skeleton tool. This is provided as part of the LCFG-Build-Skeleton package. All you need to do is run the command and answer a few questions and a skeleton for your new project will be created.

$ lcfg-skeleton
Name of the project: foo
Is this an LCFG component? (yes/no) [yes]:
Short description of the project [The LCFG foo component]:
Name of the author [Stephen Quinney]:
Email address for the author [squinney@inf.ed.ac.uk]:
Language for component (perl/shell) [perl]:
Revision Control System (CVS/None) [CVS]: None
Supported platforms [ScientificLinux5]:
Distribution license [GPLv2]:
Restart component on RPM update (yes/no) [yes]:
Use the CMake build system (yes/no) [yes]:
Check all changes are committed before a release? (yes/no) [yes]:
Generate the ChangeLog from the Revision-Control log? (yes/no) [yes]:

The default value is displayed within the square-brackets and just hitting RETURN accepts the default. For convenience, when you type in new values they are stored in a file and will be used as the defaults next time you want to create a new project (except for the project name and description, of course).

Where Next?

Once your new project has been created all further release work (creating new releases, building RPMs, etc) should be done with the lcfg-reltool command. The "Release Tools" section of the manual explains all the available commands.

Overriding the standard templates

Occasionally you might want to override the standard behaviour of the lcfg-skeleton command. The various files in a project skeleton are generated from templates using the Perl Template Toolkit. Normally they are stored in the directory /usr/share/lcfgbuild/templates/, the current list of templates is:

If necessary you can override any of these templates to generate your specific requirements. You should put a file of the same name into your personal template directory ~/.lcfg/skeleton/templates/

Within the template the answers to the questions asked by the lcfg-skeleton command are available via the skel variable (see LCFG::Build::Skeleton for full details of the attributes and methods). There is also the newly generated LCFG-build metadata object available via the pkgspec variable (see LCFG::Build::PkgSpec for full details of the attributes and methods). The best way to understand how to override the standard templates is to view them for specific usage examples.