PowerTools Documentation: Index | Source tree structure and build utilities

## 1 Source tree

    lwp_si_packages
      |
      |-- Makefile
      |-- <dsp1 name>
      |   |-- <dsp1 versionA> (Directory for dsp1's components for VersionA)
      |   |    |-- <dsp1 source archive>
      |   |    |-- <dsp1 name>.gif (DSP Logo image)
      |   |    |-- dAPI.py
      |   |    |-- default.xsl
      |   |    |-- dsp.xml
      |   |    |-- include.mk
      |   |    `-- msgs.list
      |   `-- <dsp1 versionA>
      |       :
      |
      |-- <dsp2 name>
      |   `-- <dsp2 version>
      |       :
      :
      |-- config.mk
      |-- dirs.mk (Holds most of the build related config)
      |-- main.mk (Main build driver file)
      |-- make_utils (Build utilities)
      |   |-- bump_dapi_release.xml
      |   |-- delta_dsps_dep
      |   |-- deploy.sh
      |   |-- dsp_common.mk
      |   |-- dsp_strings.xslt
      |   |-- gen_trans_targets
      |   |-- msgs_dep
      |   |-- project-id
      |   |-- ver_rel.xsl
      |   |-- xml_dep
      |   `-- xslxgettext.xml
      |-- os.mk (Build time)
      |-- rpmbuild (Packaging utilitis)
      |   |-- dsp.spec (Specfile template for dsp packaging)
      |   |-- include.mk
      |   `-- locale.spec
      |-- translations
      |   |-- README
      |   |-- de_DE.po
      |   |-- es_ES.po
      |   `-- include.mk
      `-- util
          |-- common_msgs.list
          |-- dsp.dtd
          |-- dsp_options.xsl
          `-- errornum.py

## 2 dirs.mk (Build configuration)

In most cases, we do not need to modify makefiles other than dirs.mk. dirs.mk contains DSP groups variables.
Invoking 'make rpms' would build rpms for all DSPs listed in Group0.
This looks as below.

    group0 := \
            formmail-4.2b           \
            formmail-5.0            \
            gallery-1.3.4           \
            invboard-1.1.2          \
            oscommerce-2.2ms2       \
            phpbb-2.0.6             \
            phpnuke-6.9             \
            phpopenchat-3.0.0b3     \
            postnuke-0.7.2.6        \
            phpnuke-7.0             \
            phpopenchat-3.0.0b7

If you add a new DSP entry you should add a new entry in dirs.mk in order to include it in the list of DSPs to build.
The DSP entry format is <DSP-name>-<DSP-version>
eg. mediawiki-1.3.9, squirrelmail-1.4.4

## 3 Building DSP rpms

To build DSP rpms from source tree following command can be invoked. ``

  cd lwp_si_packages
  make rpms

Generated rpms can be found in build/RPMS/i386/ directory.

## 4 Packaging

A DSP is packaged as an RPM with the following naming convention:

  <package-name>-<package-version>-<ensim-version>-<ensim-release>.

This format allows multiple versions of script packages to be installed simultaneously. All files contained in the RPM must live under a directory that includes <package-name>-<package-version> as a path component. The directory structure is similar to this:

  /usr/lib/ensim/deployables/<package-name>-<package-version>/source
  /usr/lib/ensim/deployables/<package-name>-<package-version>/lib

The source directory will contain the script package sources (those files, tarballs, etc. that belong to the script package). The lib directory will contain the Ensim-specific deploying API (dAPI) implementation.

Retrieved from "wiki/index.php/Source_tree_structure_and_build_utilities"