[manual index][section index]

SYNOPSIS

tomo provides a skeleton for building custom software, however distribution, packaging, and so on are left as an exercise for the reader. in short, tomo does not have a package manager instead, we expect programs to be either relevant enough to be in the base image, totally independent appliances that distribute tomo as part of the system image, or excutibles provided by a network service. this manual page describes the system primitives that can be adapted to your impending scenario.

/opt/mkfiles/

These mkfiles can be used as is or as basis for your own mkfiles. Unlike standard files in `/mkfiles' these know how to handle `/opt' packages; able to build/run tests (both in host os and inside emu) and have other features (generation of INDEX files for your man pages, generation of man pages from text in asciidoc markup, etc.). Start your new project using these mkfiles:

$ emu
; mkdir newproject
; cd newproject
; cp /opt/mkfiles/mkconfig-example mkconfig
; cp /opt/mkfiles/mkfile-example mkfile

/opt/skel/

Copy `/opt/skel/' into your project's directory when you start new project. You can build your project using these commands both from host os and inside emu (except `prove`, which works only in host os):

mk all
mk install

mk test
prove -r

mk clean
mk nuke
When this project installed in `/opt/skel` and your /opt is correctly set (https://github.com/powerman/inferno-opt-setup) you can also:

$ emu
; examplecmd
Hello from ExampleLib->init()
user.warn: Dec  6 05:04:40 examplecmd[158]: Hello from ExampleCmd->init()
user.err: Dec  6 05:04:40 examplecmd[158]: Hello from ExampleCmd->init()
; man examplecmd
EXAMPLECMD(1)                                       EXAMPLECMD(1)

NAME
     examplecmd - Example command in /opt skeleton project
…
; man examplelib
EXAMPLELIB(2)                                       EXAMPLELIB(2)

NAME
     examplelib - Example library in /opt skeleton project
…

/opt/setup/

Scripts to setup projects installed in `/opt' (bind their commands, man pages, etc. to standard places). Add this into `profile' file in your Inferno home dir:

/opt/setup/cmd
/opt/setup/man
The `/opt/setup/cmd' will bind all commands provided by `/opt' packages into `/dis/' , to let you run these commands by their name, without long `/opt/provider/package/dis/cmd/' prefix. The `/opt/setup/man' will bind all man pages provided by `/opt' packages into `/man/*/' and union provided man indexes with `/man/*/INDEX'

PKG(8 ) Rev:  Sat Aug 05 16:14:03 GMT 2023