tAdd manual pages for pm(1) and pack(5) - pm - barely a pack manager
 (HTM) git clone git://z3bra.org/pm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 886dcf4ddd6603a07716e03a99d0215d3e659a3c
 (DIR) parent 46ebe8eca026d0e03f85bca4398c5fa42013b39a
 (HTM) Author: z3bra <willyatmailoodotorg>
       Date:   Wed, 13 Jan 2016 19:39:45 +0100
       
       Add manual pages for pm(1) and pack(5)
       
       Diffstat:
         M config.mk                           |       2 +-
         M makefile                            |       7 +++++++
         A pack.5                              |      58 ++++++++++++++++++++++++++++++
         A pm.1                                |      48 +++++++++++++++++++++++++++++++
       
       4 files changed, 114 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/config.mk b/config.mk
       t@@ -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
 (DIR) diff --git a/makefile b/makefile
       t@@ -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
 (DIR) diff --git a/pack.5 b/pack.5
       t@@ -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
 (DIR) diff --git a/pm.1 b/pm.1
       t@@ -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