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)
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
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
--- /dev/null
+.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)
--- /dev/null
+.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)