// file      : bpkg/pkg-disfigure.cli
// license   : MIT; see accompanying LICENSE file

include <bpkg/configuration.cli>;

"\section=1"
"\name=bpkg-pkg-disfigure"
"\summary=disfigure package"

namespace bpkg
{
  {
    "<options> <pkg>",

    "\h|SYNOPSIS|

     \c{\b{bpkg pkg-disfigure} [<options>] <pkg>}

     \h|DESCRIPTION|

     The \cb{pkg-disfigure} command disfigures the previously configured
     (via \l{bpkg-pkg-build(1)} or \l{bpkg-pkg-configure(1)}) package. A
     source code package is returned to the \cb{unpacked} state. A system
     package is removed from the configuration.

     By default \cb{pkg-disfigure} will remove the package's build system
     configuration (\cb{config.build}) and also clean its output directory.
     This behavior can be suppressed with the \cb{--keep-config} and
     \cb{--keep-out} options, respectively, for example, if the package is
     to be reconfigured."
  }

  class pkg_disfigure_options: configuration_options
  {
    "\h|PKG-DISFIGURE OPTIONS|"

    bool --keep-out
    {
      "Don't clean the package's output directory."
    }

    bool --keep-config
    {
      "Don't remove the package's build system configuration
       (\cb{config.build})."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{pkg-disfigure} command the search start
   directory is the configuration directory. The following options files are
   searched for in each directory and, if found, loaded in the order listed:

   \
   bpkg.options
   bpkg-pkg-disfigure.options
   \

   The following \cb{pkg-disfigure} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}
