pack
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

git clone: git:/josuah.net/pack/ 

*pack* is a port tree based off plan 9's mk(1) and rc(1): replacement for
make(1) and sh(1).

How to make recipes [1]:

│   $PACK                   This repo.
│   |
│   |- package1
│   |  `- mkfile            mk(1) recipeto build package1
│   |
│   |- package2
│   |  |- mkfile            mk recipe to build package2
│   |  `- config.h          extra file can be contained
│   ...

How packages get built:

│   $ROOT                   set to ~/.local as an example
│   |
│   |- src                  where packages have been downloaded
│   |  |- package1
│   |  |  |- Makefile
│   |  |  |- page1.1
│   |  |  `- package1.c
│   |  |
│   |  |- package2
│   |  |  |- Makefile
│   |  |  |- package2.c
│   |  |  `- package2.h
│   |  ...
│   |
│   |- opt                  where packages get installed first
│   |  |- package1
│   |  |  |- bin/binary1
│   |  |  `- share/man/man1/page1.1
│   |  |
│   |  |- package2
│   |  |  |- bin/binary2
│   |  |  `- lib/library2.a
│   |  ...
│   |
│   |- bin                  once the packages are built in opt, they
│   |  |- binary1           get hard-linked in $ROOT
│   |  `- binary2
│   |
│   |- lib
│   |  `- library1.a
│   |
│   `- share/man1/man/page1.1

To use the packages from $ROOT, you can add these lines to your shell startup
script (such as ~/.profile):

│   export ROOT=$HOME/.local                # or any path you like
│   export PATH=$ROOT/bin:$PATH             # for binaries
│   export MANPATH=$ROOT/share/man          # for man pages
│   export LD_LIBRARY_PATH=$ROOT/lib        # for libraries

It have been tested on Debian, Alpine, Voidlinux, FreeBSD, OpenBSD, and I use
it daily.  The first version was using sh(1) shell scripts with no mkfile, and
some recipes are still to be converted.