OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-doc                      Date:   03-Jan-2003 19:04:00
  Branch: HEAD                             Handle: 2003010318040000

  Modified files:
    openpkg-doc/handbook    00TODO

  Log:
    remember issues for addition to handbook

  Summary:
    Revision    Changes     Path
    1.21        +36 -11     openpkg-doc/handbook/00TODO
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-doc/handbook/00TODO
  ============================================================================
  $ cvs diff -u -r1.20 -r1.21 00TODO
  --- openpkg-doc/handbook/00TODO       31 Dec 2002 07:27:50 -0000      1.20
  +++ openpkg-doc/handbook/00TODO       3 Jan 2003 18:04:00 -0000       1.21
  @@ -147,17 +147,42 @@
   rebuild could save a lot of time. Rebuilding make with gcc is probably
   appropriate though.
   
  -- RSE:
  -The syntax is:
  +- RSE about the new "%option" stuff:
   
  -%option <variable> <value>
  -%options [-p<padding>]
  +1. Package options are introduced with "%option <name> <value>" only. It
  +   is not allowed to just "%define <name> <value>", because this way they
  +   are not "Provided".
   
  -where "%option <variable> <value>" is syntactically equivalent with
  -"%ifndef <variable> %define <variable> <value> %endif" plus remembering
  -the string "%option <variable> %{<variable>}" in an internal macro.
  -Then "%options" expands this internal macro back into the "%option
  -<variable> <value>" strings. If a <padding> is given, the <variable>
  -part in "%option <variable> <value>" is padding with spaces to a fixed
  -width in order to get a nice aligned output in %description texts.
  +2. "%option" directives _HAVE_ to be placed after the (usually first)
  +   .spec part where the "Name:" header is part of. This is because
  +   %option requires the definition of "Name:" for its own operation.
  +
  +3. The effect of "%option <name> <value>" is a "%ifndef <name>"+"%define
  +   <name> <value>"+"%endif" plus a "Provides: <package>::<name> =
  +   <value>". The "%define" part is so that you can check for the option
  +   while building with '%if "%{<name>}" == "<value>"'+'%endif'. The
  +   "Provides" part is so that the package exports the option.
  +
  +4. You can view the options a package provides via multiple ways:
  +
  +   a) if you have foo.spec file, just run "grep '^%option' foo.spec"
  +
  +   b) if you have a source or binary RPM foo*.rpm, run "rpm -qpi
  +      foo*.rpm" and watch under "Provides:" or run alternatively "rpm
  +      -qp --provides foo*rpm". For this to work also with source RPMs,
  +      I've this evening patched RPM, so don't be confused.
  +
  +   c) if you have an installed foo package, run "rpm -qi foo" and watch
  +      under "Provides:" or run alternatively "rpm -q --provides foo".
  +
  +5. As usual, you can set/override option values on the "rpm --rebuild"
  +   command line with "--define '<name> <value>'".
  +
  +6. As usual, another package can depend on the package <package> via
  +   "[Build]PreReq: <package>". Additionally, it can also depend on
  +   <package> to be build under option <name> with <value> by using
  +   "[Build]PreReq: <package>::<name> == <value>".
  +
  +7. Any package using %option _has_ to require at least "openpkg >=
  +   20030103".
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to