From c872426b1c04c3c8d6b4601b440ef4b6cc55e98d Mon Sep 17 00:00:00 2001 From: Greg Tucker Date: Fri, 21 Sep 2018 18:14:20 -0700 Subject: [PATCH] doc: Add man file for igzip Change-Id: I13b054aebddcdc1bfa9ae9b82cf4fc5c8ebab94b Signed-off-by: Greg Tucker --- make.inc | 7 +++-- programs/Makefile.am | 5 +++ programs/igzip.1 | 75 ++++++++++++++++++++++++++++++++++++++++++++ programs/igzip.1.h2m | 28 +++++++++++++++++ 4 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 programs/igzip.1 create mode 100644 programs/igzip.1.h2m diff --git a/make.inc b/make.inc index a08351a..f02ef4e 100644 --- a/make.inc +++ b/make.inc @@ -256,9 +256,10 @@ isa-l.h: # Target for install prefix = /usr/local -install_dirs = $(prefix)/lib $(prefix)/include/isa-l +man1dir ?= $(prefix)/share/man/man1 +install_dirs = $(prefix)/lib $(prefix)/include/isa-l $(prefix)/bin $(man1dir) $(install_dirs): ; mkdir -p $@ -install: $(sort $(extern_hdrs)) | $(install_dirs) $(lib_name) $(so_lib_name) isa-l.h +install: $(sort $(extern_hdrs)) | $(install_dirs) $(lib_name) $(so_lib_name) isa-l.h $(bin_PROGRAMS) install -m 644 $(lib_name) $(prefix)/lib/libisal.a install -m 644 $^ $(prefix)/include/isa-l/. install -m 664 isa-l.h $(prefix)/include/. @@ -273,6 +274,7 @@ else echo 'Lib installed at $(prefix)/lib. Run system-dependent programs to add shared lib path.' endif install -m 774 $(bin_PROGRAMS) $(prefix)/bin/. + install -m 664 $(dist_man_MANS) $(man1dir)/. uninstall: $(RM) $(prefix)/lib/libisal.a @@ -283,6 +285,7 @@ uninstall: $(RM) $(prefix)/include/isa-l.h $(RM) $(prefix)/lib/$(basename $(so_lib_inst)).dylib $(RM) $(prefix)/bin/$(notdir $(bin_PROGRAMS)) + $(RM) $(man1dir)/$(notdir $(dist_man_MANS)) # Collect performance data rpt_name = perf_report_$(shell uname -n)_$(shell date +%y%m%d).perf diff --git a/programs/Makefile.am b/programs/Makefile.am index d5c59d8..46f2a23 100644 --- a/programs/Makefile.am +++ b/programs/Makefile.am @@ -31,3 +31,8 @@ bin_PROGRAMS += programs/igzip programs_igzip_SOURCES = programs/igzip_cli.c programs_igzip_LDADD = libisal.la +dist_man_MANS = programs/igzip.1 +other_src += programs/igzip.1.h2m + +programs/igzip.1: % : %.h2m programs/igzip_cli.c + -help2man -o $@ -i $< -N ./programs/igzip diff --git a/programs/igzip.1 b/programs/igzip.1 new file mode 100644 index 0000000..6d28a86 --- /dev/null +++ b/programs/igzip.1 @@ -0,0 +1,75 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH IGZIP "1" "September 2018" "igzip command line interface 2.23.0" "User Commands" +.SH NAME +igzip \- manual page for igzip command line interface 2.23.0 +.SH SYNOPSIS +.B igzip +[\fI\,options\/\fR] [\fI\,infiles\/\fR] +.SH DESCRIPTION + +Compress or decompress files similar to gzip using the ISA-L fast deflate library. + +Output .gz files are compatible with gzip and [RFC-1952]. + +Options are similar to gzip except --keep is default. +.SH OPTIONS +.TP +\fB\-h\fR, \fB\-\-help\fR +help, print this message +.TP +\-# +use compression level # with 0 <= # <= 3 +.TP +\fB\-o\fR + output file +.TP +\fB\-c\fR, \fB\-\-stdout\fR +write to stdout +.TP +\fB\-d\fR, \fB\-\-decompress\fR +decompress file +.TP +\fB\-z\fR, \fB\-\-compress\fR +compress file (default) +.TP +\fB\-f\fR, \fB\-\-force\fR +overwrite output without prompting +.TP +\fB\-\-rm\fR +remove source files after successful (de)compression +.TP +\fB\-k\fR, \fB\-\-keep\fR +keep source files (default) +.TP +\fB\-S\fR, \fB\-\-suffix\fR <.suf> +suffix to use while (de)compressing +.TP +\fB\-V\fR, \fB\-\-version\fR +show version number +.TP +\fB\-v\fR, \fB\-\-verbose\fR +verbose mode +.TP +\fB\-q\fR, \fB\-\-quiet\fR +suppress warnings +.PP +with no infile, or when infile is \- , read standard input +.SH EXAMPLES + +Make compressed file1.gz and file2.gz and keep file1 and file2. +.RS +.B igzip file1 file2 +.RE + +Piped compression and decompression. +.RS +.B igzip -c file.txt | igzip -d -c - +.RE + +Streaming compression from output of tar, compress level 2. +.RS +.B tar cf - dir1 | igzip -2 > dir1.tar.gz +.RE +.SH "REPORTING BUGS" + +Report bugs to https://github.com/01org/isa-l/issues diff --git a/programs/igzip.1.h2m b/programs/igzip.1.h2m new file mode 100644 index 0000000..6533673 --- /dev/null +++ b/programs/igzip.1.h2m @@ -0,0 +1,28 @@ +[Description] + +Compress or decompress files similar to gzip using the ISA-L fast deflate library. + +Output .gz files are compatible with gzip and [RFC-1952]. + +Options are similar to gzip except --keep is default. + +[Examples] + +Make compressed file1.gz and file2.gz and keep file1 and file2. +.RS +.B igzip file1 file2 +.RE + +Piped compression and decompression. +.RS +.B igzip -c file.txt | igzip -d -c - +.RE + +Streaming compression from output of tar, compress level 2. +.RS +.B tar cf - dir1 | igzip -2 > dir1.tar.gz +.RE + +[Reporting Bugs] + +Report bugs to https://github.com/01org/isa-l/issues