Class Packaging
The starter kit and a cooking recipe to create your own Tango class packages
How to create your own Tango Class Packages?
Follow the cooking recipe:
- Download the tango_class_package.tar.gz (starter kit).
- Unzip and untar the package. This will create a directory CLASS_NAME with the necessary packaging files.
cd CLASS_NAME and check-out your tango class module into this directory. Use the anonymous user to do the check out! This allows the later package user to easily update the class sources from the CVS.
export CVSROOT=:pserver:anonymous@tango-ds.cvs.sourceforge.net:/cvsroot/tango-ds
cvs co module
- Rename the CLASS_NAME directory now to the name of the TANGO class you want to package.
- The files README, configure.ac and Makefile_CLASS_NAME.am contain fields where the placeholder CLASS_NAME is used. All these places need to be verified and CLASS_NAME needs to be replaced by the name of the Tango class you are going to package.
- Adapt the README file with your class name and its version number
- Adapt the configure.ac script:
- AC_INIT -> Needs you class name as the package name and a correct version number in the form MAJOR.MINOR.PATCH! The version number should correspond to the last release tag of your class.
- Adapt AC_CONFIG_FILES with the directory name of your checked-out CVS module for your class.
- Add dependencies to other classes in the dependency section of the configure.ac script. If you have a dependency only to one other Tango class, just set DEPENDENCY_CLASS_NAME to the name of the Tango class you depend on. This will check whether the class is already installed and available when the configure script is executed.
- The Makefile.am will search for a subdirectory with the class name (which should correspond to the CVS module name) entered in AC_INIT! If your cvs module name and your class name differ, adapt Makefile.am.
- Write the Makefile.am for your class:
- The distribution package contains a Makefile_CLASS_NAME.am. Move this Makefile_CLASS_NAME.am to the source directory of your Tango class and rename it Makefile.am. Replace all placeholders CLASS_NAME with the name of your Tango class. ATTENTION: Do not replace CLASS_NAME in DEPENDENCY_CLASS_NAME!
- If you have declared a dependency on another Tango class, uncomment the following two lines to enable linking with the corresponding class library.
#Skilift_LDADD += -l@DEPENDENCY_CLASS_NAME@
#Skilift_LDADD += @TANGO_CLASSES_ROOT@/lib/lib@DEPENDENCY_CLASS_NAME@.a
- You still might need to add additional files. The delivered Makefile handles all files for a standard Tango class.
- Please keep all options of the example Makefile to get a coherent compilation of classes!
- You might need additional Makfile.am(s) if your class module contains different sub directories!
Testing of the Tango class package:
- Use the bootstrap script to create the configure script and the necessary Makefile.in files for the package
./bootstrap
- Try to build the package. You can read the README file for the package to get more information how to build a Tango class.
export OMNI_ROOT=.....
export TANGO_ROOT=......
mkdir build
cd build
../configure
make
make install
make clean
Creating the final Package:
- Be sure that you have started a make clean before you package.
- Delete also the build directory before packaging.
cd ..
rm -rf build
- Use a normal tar to create your package! Do not use make dist! This will also include the CVS directories into the package and allows the user to update easily the class source code.
cd ..
tar cvf CLASS_NAME.tar CLASS_NAME
gzip CLASS_NAME.tar

