build system: "make hosttools" doesn't exist, remove it from "make help"
[oweals/busybox.git] / archival / dpkg_deb.c
index 0ce7c02d83b959e07f726501d93427a8cf702d72..13f9db991534668381d0944d24f29bdf38baabd4 100644 (file)
@@ -4,8 +4,47 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+
+//config:config DPKG_DEB
+//config:      bool "dpkg_deb"
+//config:      default n
+//config:      select FEATURE_SEAMLESS_GZ
+//config:      help
+//config:        dpkg-deb unpacks and provides information about Debian archives.
+//config:
+//config:        This implementation of dpkg-deb cannot pack archives.
+//config:
+//config:        Unless you have a specific application which requires dpkg-deb,
+//config:        say N here.
+//config:
+//config:config FEATURE_DPKG_DEB_EXTRACT_ONLY
+//config:      bool "Extract only (-x)"
+//config:      default n
+//config:      depends on DPKG_DEB
+//config:      help
+//config:        This reduces dpkg-deb to the equivalent of
+//config:        "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none
+//config:        of the extra dpkg-deb, ar or tar options are needed, they are linked
+//config:        to internally.
+
+//applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb))
+//kbuild:lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
+
+//usage:#define dpkg_deb_trivial_usage
+//usage:       "[-cefxX] FILE [argument]"
+//usage:#define dpkg_deb_full_usage "\n\n"
+//usage:       "Perform actions on Debian packages (.debs)\n"
+//usage:     "\n       -c      List contents of filesystem tree"
+//usage:     "\n       -e      Extract control files to [argument] directory"
+//usage:     "\n       -f      Display control field name starting with [argument]"
+//usage:     "\n       -x      Extract packages filesystem tree to directory"
+//usage:     "\n       -X      Verbose extract"
+//usage:
+//usage:#define dpkg_deb_example_usage
+//usage:       "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
+
 #include "libbb.h"
-#include "unarchive.h"
+#include "bb_archive.h"
 
 #define DPKG_DEB_OPT_CONTENTS         1
 #define DPKG_DEB_OPT_CONTROL          2