]> pd.if.org Git - zpackage/commitdiff
add man pages
authorNathan Wagner <nw@hydaspes.if.org>
Fri, 7 Dec 2018 11:06:39 +0000 (11:06 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Fri, 7 Dec 2018 15:48:11 +0000 (15:48 +0000)
Makefile
doc/zpm-contents.8 [new file with mode: 0644]
doc/zpm-list.8 [new file with mode: 0644]

index 1a4b2b6bcc647703e862d4a6fb65ba3fbb288256..13b3d2b6188023aeb6e3fd559bdc24e8bb471d62 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ ZPKGBIN=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \
 SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-preserve zpm-test zpm-log \
        zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \
        zpm-pkg zpm-add zpm-pkgfile zpm-gc zpm-repo zpm-update zpm-confgit
+MANPAGES=$(addprefix doc/, zpm.8 zpm-list.8 zpm-contents.8)
 COMPILED=$(ZPKGBIN)
 PROGRAMS=$(SCRIPTS) $(COMPILED)
 
@@ -72,11 +73,11 @@ lib/libjsw.a: $(JSWOBJ)
 
 ZPM:= ./zpm -P.
 
-zpm-$(ZPMVER)-1.zpm: programs doc/zpm.8
+zpm-$(ZPMVER)-1.zpm: programs $(MANPAGES)
        rm -f $@
        $(ZPM) newpackage -C zpm-$(ZPMVER)-1
        $(ZPM) add -v -u root -g root -f $@ -P /sbin zpm-$(ZPMVER)-1 $(sort $(PROGRAMS))
-       $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc doc/zpm.8
+       $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc $(MANPAGES)
 
 tarball: zpm-$(ZPMVER)-1.tar.xz
 
@@ -192,11 +193,11 @@ zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o
 libelf.a: elf/libelf.o
        ar rcuv $@ $?
 
-install: $(COMPILED) doc/zpm.8
+install: $(COMPILED) $(MANPAGES)
        test -d $(DESTDIR)/sbin || install -d $(DESTDIR)/sbin
        install $(PROGRAMS) $(DESTDIR)/sbin
        mkdir -p $(DESTDIR)/usr/share/man/man8
-       install -m644 doc/zpm.8 $(DESTDIR)/usr/share/man/man8
+       install -m644 $(MANPAGES) $(DESTDIR)/usr/share/man/man8
 
 scan-prep: clean sqlite/sqlite3.o sqlite/shell.o lib/liblzma.a
        @echo scan-build -v -o report make -j10
diff --git a/doc/zpm-contents.8 b/doc/zpm-contents.8
new file mode 100644 (file)
index 0000000..4cdb964
--- /dev/null
@@ -0,0 +1,33 @@
+.TH zpm-contents 8 2018-11-30 "ZPM 0.2"
+.SH NAME
+zpm-contents \- list files in a zpm package
+.SH SYNOPSIS
+.B zpm contents
+[
+.BI -f " pkgfile"
+]
+[
+.I package ...
+]
+[
+.B --
+.I fileglob ...
+]
+.SH DESCRIPTION
+zpm-contents lists files belonging to any of the given packages,
+or all packages.  Additionally, the list of packages can be
+terminated with '--' and any additional arguments are glob patterns.
+.SH OPTIONS
+\-f specify the package file to find packages in
+.SH EXAMPLES
+zpm contents 
+.SH EXIT STATUS
+0 on success non zero on failure
+.SH FILES
+/var/lib/zpm/local.db
+.SH ENVIRONMENT
+ZPMDB
+.SH AUTHOR
+Nathan Wagner
+.SH SEE ALSO
+zpm(8)
diff --git a/doc/zpm-list.8 b/doc/zpm-list.8
new file mode 100644 (file)
index 0000000..975e43c
--- /dev/null
@@ -0,0 +1,45 @@
+.TH zpm-list 8 2018-12-07 "ZPM 0.2"
+.SH NAME
+zpm-list \- list packages
+.SH SYNOPSIS
+.B zpm list
+[\fB\-f\fR \fIpkgfile\fR] 
+[\fB\-s\fR \fIstatus\fR]
+[
+.B \-vIna
+]
+[
+.IR package ...
+]
+.SH DESCRIPTION
+zpm-list lists packages in a package file.
+The package file is taken from either the ZPMDB environment variable
+the \-f option, or the system default of /var/lib/zpm/local.db.
+.SH OPTIONS
+.TP
+.BI \-f " pkgfile"
+specify the package file to find packages in
+.TP
+.B \-I
+list only installed packages
+.TP
+.B \-s \fIstatus\fR
+add the given status to the list of statuses to list
+.TP
+.B \-v
+print the package status after the package name
+.TP
+.B \-n
+list only the package name, not the full package id
+.SH EXAMPLES
+zpm list 
+.SH EXIT STATUS
+0 on success non zero on failure
+.SH FILES
+/var/lib/zpm/local.db
+.SH ENVIRONMENT
+ZPMDB
+.SH AUTHOR
+Nathan Wagner
+.SH SEE ALSO
+.BR zpm (8)