Creating Source Packages

The -srcpkg option is used to instruct the GPT build tools to create source packages from a source tree. The following usage applies:

uberBuild -srcpkg [ -compiler ] [ -srcdir ] [-pkgdir ] [ -fast ] 
                  [ -pkgconf [ variable substitutions ] ] pkgs

          -compiler=s Specifies the compiler (s) to use for bootstrapping
          -srcdir=s   Directory (s) containing raw sources
          -pkgconf=s  Package configuration file (s)
          -pkgdir=s   Directory (s) with GPT packages and bundles
          -fast       Optimize when possible, skip redundant steps
          pkgs        Names of packages to create, as defined in the
                      packages GPT meta data file

The -compiler option specifies which compiler to use for the bootstrapping sequence. Not all GPT source packages require bootstrapping, however it is the default behavior for the GPT build tools. When raw sources are bootstrapped using the default bootstrap sequence, the sources are configured using autoconf and the resulting configure script is run specifying the given compiler. This allows the source directory to be configured as if it was prepared to be built into binary form. With the makefiles available, the build tools can issue make commands for known targets to further prepare the source directory for packaging. Although the -compiler option is not used for compilation in this step, it should be given with the system's compiler to gaurantee a successful configuration. The default for this option is gcc32.

The -srcdir option specifies where to find raw sources. This option is not needed when -pkgconf is used and the package configuration file was previously generated from this source directory. The -srcdir option requires more processing because it must search the source tree for available packages.

The -pkgconf option specifies a package configuration file previous generated from the given source directory. This option is a substitute for -srcdir which increases performance since the source tree does not have to be searched each time the tools are created. It also increases flexibility since the package configuration file can contain bootstrapping information and buildflags information that can not be determined from the source directory alone.

The -pkgdir option specifies the directory containing source and binary packages and bundles. This directory is used to store newly created source and binary packages and bundles as well. This option defaults to the current working directory.

The -fast option tells the GPT build tools to optimize when possible. The optimizations for source package creation mean that the build tools will not rebuild the source package if a source package by the same name is available in -pkgdir. The build tools will first search for available source packages and if none are found, it will search the source bundles. If a matching source package is found within a source bundle within -pkgdir, that source package is extracted into -pkgdir and the build tools proceed to the next source package to create.

The bootstrapping sequence is not required for all GPT packages, that is knowledge only the package developer will have. If the package requires special bootstraping instructions, or no bootstrapping at all, a package configuration file must be used. The key 'srcbootstrap' is used to inform the build tools that the package will not used the default bootstrapping sequence. If no bootstrapping is required, the key should be present with no value. For example, the following entry uses the default source package bootstrapping:

myproxy
    srcdir %SRCDIR%/myproxy

The next example specifies its own boot strapping sequence:

nws-client
    srcdir %SRCDIR%/nws
    srcbootstrap rm -f pkg_data_src.gpt pkg_data_src.gpt.server filelist.in.server filelist.in ;mv pkg_data_src.gpt.client pkg_data_src.gpt ; ln -s filelist.in.client filelist.in

And finally, this last bootstrapping example describes a package which does not require any source boot strapping:

product_x
	srcdir %SRCDIR/product/x
	srcbootstrap