pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit 886dcf4ddd6603a07716e03a99d0215d3e659a3c
parent 46ebe8eca026d0e03f85bca4398c5fa42013b39a
Author: z3bra <willyatmailoodotorg>
Date:   Wed Jan 13 19:39:45 2016

Add manual pages for pm(1) and pack(5)

Diffstat:
 config.mk |  2 +-
 makefile  |  6 ++++++
 pack.5    | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 pm.1      | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/config.mk b/config.mk @@ -2,7 +2,7 @@ CC = cc LD = $(CC) PREFIX = /usr/local -MANPREFIX = $(PREFIX)/man +MANPREFIX = $(PREFIX)/share/man CFLAGS = -Wall -Wextra -g LDFLAGS = -larchive -lbz2 -lz diff --git a/makefile b/makefile @@ -12,8 +12,14 @@ clean: install: $(BIN) mkdir -p $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + mkdir -p $(DESTDIR)$(MANPREFIX)/man5 cp $(BIN) $(DESTDIR)$(PREFIX)/bin/$(BIN) + cp $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1/ + cp pack.5 $(DESTDIR)$(MANPREFIX)/man5/ chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) uninstall: $(BIN) rm $(DESTDIR)$(PREFIX)/bin/$(BIN) + rm $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1 + rm $(DESTDIR)$(MANPREFIX)/man5/pack.5+ \ No newline at end of file diff --git a/pack.5 b/pack.5 @@ -0,0 +1,58 @@ +.Dd 2016-01-13 +.Dt PACK 5 +.Os POSIX.1-2008 +.Sh NAME +.Nm pack +.Nd pack file format +.Sh DESCRIPTION +.Nm +is the name given to compressed archives used by +.Xr pm 1 +to install softwares under a directory. +.Ss FILENAME +The pack name is used to extract informations about it content, and should +follow a strict naming scheme: +.Pa <name>:<version>.tar.bz2 +.Ss ARCHIVE FORMAT +A pack is a +.Em bzip2 +compressed +.Em tar file +containing all the files and sub directories meant to be extracted under the +.Ev $ROOT +directory (See +.Xr pm 1 ) . +For example: +.Bd -literal -width Ds -offset indent +bin/ +bin/pm +share/ +share/man/ +share/man/man1/ +share/man/man1/pm.1 +share/man/man5/ +share/man/man5/pack.5 +.Ed +.Sh USAGE +In order to create a pack suitable for use with +.Xr pm 1 , +you can use external tools to first install your pack into a specific +directory, change to this directory and archive its content. The typical +workflow to create packs would be the following: +.Bd -literal -width Ds -offset indent +make +make DESTDIR=/tmp/rootfs install +cd /tmp/rootfs +tar -c $(ls) | bzip2 > /tmp/pm:0.0.tar.bz2 +.Ed +.Pp +You can check the content of this pack with: +.Bd -literal -width Ds -offset indent +bzip2 -cd < /tmp/pm:0.0.tar.bz2 | tar -t +.Ed +.Sh SEE ALSO +.Xr pm 1 , +.Xr tar 1 , +.Xr bzip2 1 , +.Sh AUTHORS +.An Willy Goiffon Aq Mt willy@mailoo.org diff --git a/pm.1 b/pm.1 @@ -0,0 +1,47 @@ +.Dd 2016-01-13 +.Dt PM 1 +.Os POSIX.1-2008 +.Sh NAME +.Nm pm +.Nd pack manager +.Sh SYNOPSIS +.Nm pm +.Op Fl adfiuv +.Op Ar arg.. +.Sh DESCRIPTION +.Nm +installs, deletes, inspects and updates packs on a POSIX operating system. +.Bl -tag -width Ds +.It Fl a Ar <file> +Add pack(s) under $ROOT. This action will fail if a file from the pack already +exists under $ROOT (See +.Fl f +flag) +.It Fl d Ar <name> +Delete pack(s) based on information from $META/pack +.It Fl u Ar <file> +Update pack(s) by first deleting it, and reinstalling it +.It Fl i Ar [name] +If a pack name is provided, dump the content of $META/pack/files to stdout. +Otherwise, list all packs installed on the system along with their version +number +.It Fl v +Enable verbose mode +.It Fl f +Force overwriting files +.El +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev ROOT +Specifies the directory to use as the rootfs for packs installation +(default: /ns/pm/rootfs) +.It Ev META +Specifies the directory to use for storing packs metadata files +(default: /ns/pm/rootfs/metadata) +.El +.Sh SEE ALSO +.Xr pack 5 , +.Xr tar 1 , +.Xr bzip2 1 +.Sh AUTHORS +.An Willy Goiffon Aq Mt willy@mailoo.org+ \ No newline at end of file