This page is obosolete, please go to

How to make a new package

( Document last updated 2nd December 2008 by Marco Cattaneo )

Important Note: from January 31st 2009, the CVSROOT variable is not part of the default LHCb environment any more. It has therefore to be added to commands which are not using the local CVS/Root file. This is the case for example for "cvs import" or  plain "cvs checkout". Namely one should read

> cvs -d import ...

instead of

> cvs import ...

Anyway for regular checkout of existing directories, the getpack utility is doing the right job without any extra options.

Assume that you want to write a components package called MyComponents for subsystem Phys

> cd $HOME/cmtuser
> mkdir -p Phys/MyComponents
> cd  Phys/MyComponents

> mkdir cmt
> mkdir doc
> mkdir src

> cd doc
> emacs release.notes
   -- edit the release notes --
> cd ../cmt
> emacs requirements
  -- edit the requirements file--
 > cmt config

> cd ../src
  -- add *.cpp files
> cd ../cmt
> cmt make            ===> component library is built

> cd $HOME/cmtuser/Phys/MyComponents
-- Remove first all files you do not wish to import: binary directories, backup copies (*~), generated files in cmt directory (only requirements is needed)
> rm -r slc*
> rm */*~
> rm cmt/*.*
> rm cmt/*Make*
-- And now import to CVS
> cvs -d import -m " first import of MyComponents under Phys" Phys/MyComponents myid v0r0
myid is a "vendor-tag" in the CVS terminology.  I use my logon id

Please make sure that the import command is run from inside the directory you want to import ("cd $HOME/cmtuser/Phys/MyComponents")

> cd $HOME/cmtuser
> cvs -d co CVSROOT/modules
> emacs modules
   --- add your package in the list
   Phys/MyComponents         Phys/MyComponents
> cvs commit -m "add Phys/MyComponents in the list of CVS modules"
> cd ..
> rm -r CVSROOT

> cd ..
> mv MyComponents MyComponents.keep
> cd $HOME/cmtuser
> getpack Phys/MyComponents v1r0 head
> cd Phys/MyComponents/cmt
> cmt show uses
> cmt make

> cd ../..
> ls
   MyComponents MyComponents.keep
> rm -r MyComponents.keep