User Commands                                         PKGBUILD(1)



NAME
     pkgbuild - Package Build Engine


SYNOPSIS
     pkgbuild [--help]  [--version]  [--interactive]  [-v]  [-vv]
     [-bstage]    [--short-circuit]   [--define   "name   value"]
     [--with-option] [--without-option] [--rebuild]  [--pkgformat
     fmt] spec...


DESCRIPTION
     pkgbuild is a build engine that uses build  recipes  similar
     to  rpmbuild's  spec  file  to build software components and
     create SVr4 or IPS binary packages.


OPTIONS
  Miscellaneous Options
     --help
          displays a short help text

     --version
          prints the version of pkgbuild

     -v   verbose mode

     -vv  very verbose mode

  Build Options
     --interactive
          starts a subshell if a build fails allowing the user to
          alter  the  state  of  the build tree and then abort or
          continue the build

     -bstage
          build a component, exit after stage stage  where  stage
          is one of:


              p    source tree setup (%prep only)

              c    compile (%prep and %build)

              i    install (%prep, %build and %install)

              b    binary package (%prep,  %build,  %install  and
                   package)

              s    source package (%prep,  %build,  %install  and
                   package)




SunOS 5.10          Last change: May 17, 2010                   1






User Commands                                         PKGBUILD(1)



              a    binary and  source  package   (%prep,  %build,
                   %install and package)

     --short-circuit
          start the build straight from the stage specified  with
          the  -b  option, bypassing the stages leading up to it.
          For example --short-circuit -bi will run  the  %install
          section  only,  bypassing  %prep and %build and exiting
          after %install.

     --rebuild
          rebuild a source package

     --pkgformat fmt
          create the binary and source  packages  using  the  fmt
          package format, where fmt is one of:

              filesystem, fs
                   SVr4 filesystem format

              datastream, ds
                   SVr4 datastream format

              ips  Image Packaging System package

  Build Features
     --define "name value"
          defines a macro called name and assigns  value  as  the
          macro value before reading the spec file(s).

     --with-option
          same as
          --define "_with_option --with-option"

     --without-option
          same as
          --define "_without_option --without-option"



EXAMPLES
     Example 1: set up the source tree for foo.spec:

     pkgbuild -bp foo.spec

     Example 2: build bar.spec with debug options:

     pkgbuild --with-debug -ba bar.spec







SunOS 5.10          Last change: May 17, 2010                   2






User Commands                                         PKGBUILD(1)



ENVIRONMENT VARIABLES
     The following environment variables affect the execution  of
     pkgbuild:


     PKGBUILD_IPS_SERVER
          the server to post IPS binary packages to, defaults  to
          the local repository

     PKGBUILD_SRC_IPS_SERVER
          the server to post IPS source packages to, defaults  to
          PKGBUILD_IPS_SERVER



EXIT STATUS
     The following exit values are returned:


     1    ERROR

     2    ERROR sending package to IPS server

     3    ERROR closing transaction with IPS server

     0    OK


FILES
     /usr/bin/pkgbuild
          executable for pkgbuild

     ~/.pkgbuildmacros
          user defined macros. The format  of  this  file  is  on
          definition per line in the following format:
          %macro_name value


ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:














SunOS 5.10          Last change: May 17, 2010                   3






User Commands                                         PKGBUILD(1)



     __________________________________________
    |   ATTRIBUTE TYPE    |  ATTRIBUTE VALUE  |
    |_____________________|___________________|
    | Availability        |  package/pkgbuild |
    |_____________________|___________________|
    | Interface Stability |  Volatile         |
    |_____________________|___________________|


SEE ALSO
     Spec  file  description   in
     /usr/share/doc/pkgbuild/spec-files.txt

     attributes(5), pkgtool(1), spectool(1), pkg(5), pkgmk(1)


NOTES
     Written by Laszlo (Laca) Peter, Oracle Corporation, 2010





































SunOS 5.10          Last change: May 17, 2010                   4