archival/*: move "kbuild:" snippets into .c files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-11-14 09:53:52 +01:00
parent 73225b6d6e
commit 66620fa626
13 changed files with 35 additions and 26 deletions

View File

@ -9,22 +9,3 @@ libs-y += libarchive/
lib-y:=
INSERT
lib-$(CONFIG_AR) += ar.o
lib-$(CONFIG_CPIO) += cpio.o
lib-$(CONFIG_DPKG) += dpkg.o
lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
lib-$(CONFIG_RPM) += rpm.o
lib-$(CONFIG_TAR) += tar.o
lib-$(CONFIG_UNZIP) += unzip.o
lib-$(CONFIG_LZOP) += lzop.o bbunzip.o
lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
lib-$(CONFIG_BZIP2) += bzip2.o bbunzip.o
lib-$(CONFIG_UNXZ) += bbunzip.o
lib-$(CONFIG_UNLZMA) += bbunzip.o
lib-$(CONFIG_BUNZIP2) += bbunzip.o
lib-$(CONFIG_GUNZIP) += bbunzip.o
lib-$(CONFIG_UNCOMPRESS) += bbunzip.o

View File

@ -17,6 +17,8 @@
* http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html
*/
//kbuild:lib-$(CONFIG_AR) += ar.o
//usage:#define ar_trivial_usage
//usage: "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
//usage:#define ar_full_usage "\n\n"

View File

@ -7,6 +7,9 @@
#include "libbb.h"
#include "bb_archive.h"
/* lzop_main() uses bbunpack(), need this: */
//kbuild:lib-$(CONFIG_LZOP) += bbunzip.o
/* Note: must be kept in sync with archival/lzop.c */
enum {
OPT_STDOUT = 1 << 0,
@ -205,7 +208,6 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define uncompress_trivial_usage
//usage: "[-cf] [FILE]..."
//usage:#define uncompress_full_usage "\n\n"
@ -213,6 +215,7 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
//usage: "\n -c Write to stdout"
//usage: "\n -f Overwrite"
//kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o
#if ENABLE_UNCOMPRESS
static
IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(transformer_aux_data_t *aux)
@ -257,7 +260,6 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
* See the license_msg below and the file COPYING for the software license.
* See the file algorithm.doc for the compression algorithms and file formats.
*/
//usage:#define gunzip_trivial_usage
//usage: "[-cft] [FILE]..."
//usage:#define gunzip_full_usage "\n\n"
@ -278,6 +280,8 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
//usage:#define zcat_full_usage "\n\n"
//usage: "Decompress to stdout"
//kbuild:lib-$(CONFIG_GZIP) += bbunzip.o
//kbuild:lib-$(CONFIG_GUNZIP) += bbunzip.o
#if ENABLE_GUNZIP
static
char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM)
@ -356,8 +360,11 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
//usage: "[FILE]..."
//usage:#define bzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
//applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
//applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat))
//kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o
//kbuild:lib-$(CONFIG_BUNZIP2) += bbunzip.o
#if ENABLE_BUNZIP2
static
IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(transformer_aux_data_t *aux)
@ -385,7 +392,6 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//usage:#define unlzma_trivial_usage
//usage: "[-cf] [FILE]..."
//usage:#define unlzma_full_usage "\n\n"
@ -426,6 +432,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
//usage:#define xzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
//kbuild:lib-$(CONFIG_UNLZMA) += bbunzip.o
#if ENABLE_UNLZMA
static
IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(transformer_aux_data_t *aux)
@ -451,6 +458,7 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
#endif
//kbuild:lib-$(CONFIG_UNXZ) += bbunzip.o
#if ENABLE_UNXZ
static
IF_DESKTOP(long long) int FAST_FUNC unpack_unxz(transformer_aux_data_t *aux)

View File

@ -7,6 +7,8 @@
* about bzip2 library code.
*/
//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o
//usage:#define bzip2_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage:#define bzip2_full_usage "\n\n"

View File

@ -14,6 +14,8 @@
#include "libbb.h"
#include "bb_archive.h"
//kbuild:lib-$(CONFIG_CPIO) += cpio.o
//usage:#define cpio_trivial_usage
//usage: "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]")
//usage: " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]")

View File

@ -28,6 +28,8 @@
*
*/
//kbuild:lib-$(CONFIG_DPKG) += dpkg.o
//usage:#define dpkg_trivial_usage
//usage: "[-ilCPru] [-F OPT] PACKAGE"
//usage:#define dpkg_full_usage "\n\n"

View File

@ -5,6 +5,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//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"

View File

@ -39,6 +39,8 @@ gzip: bogus: No such file or directory
aa: 85.1% -- replaced with aa.gz
*/
//kbuild:lib-$(CONFIG_GZIP) += gzip.o
//usage:#define gzip_trivial_usage
//usage: "[-cfd] [FILE]..."
//usage:#define gzip_full_usage "\n\n"

View File

@ -25,6 +25,8 @@
"Minimalized" for busybox by Alain Knaff
*/
//kbuild:lib-$(CONFIG_LZOP) += lzop.o
//usage:#define lzop_trivial_usage
//usage: "[-cfvd123456789CF] [FILE]..."
//usage:#define lzop_full_usage "\n\n"

View File

@ -7,6 +7,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//kbuild:lib-$(CONFIG_RPM) += rpm.o
//usage:#define rpm_trivial_usage
//usage: "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm"
//usage:#define rpm_full_usage "\n\n"

View File

@ -7,6 +7,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
//usage:#define rpm2cpio_trivial_usage
//usage: "package.rpm"
//usage:#define rpm2cpio_full_usage "\n\n"

View File

@ -42,6 +42,8 @@
* This doesn't feel right, and IIRC GNU tar doesn't do that.
*/
//kbuild:lib-$(CONFIG_TAR) += tar.o
#include <fnmatch.h>
#include "libbb.h"
#include "bb_archive.h"

View File

@ -9,16 +9,16 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* For reference see
* http://www.pkware.com/company/standards/appnote/
* http://www.info-zip.org/pub/infozip/doc/appnote-iz-latest.zip
*/
/* TODO
*
* TODO
* Zip64 + other methods
*/
//kbuild:lib-$(CONFIG_UNZIP) += unzip.o
//usage:#define unzip_trivial_usage
//usage: "[-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]"
//usage:#define unzip_full_usage "\n\n"