install(1) - Plan 9 from User Space

| INSTALL(1) | INSTALL(1)
| NAME
| install – notes about Plan 9 from User Space installation
SYNOPSIS
| `cd /usr/lib/plan9; ./INSTALL` [ `−b` | `−c` ] [ `−r` path ]
DESCRIPTION
| To obtain the Plan 9 tree, use Git (see git(1)) or download a tar file from `https://9fans.github.io/plan9port`.
The tree can be unpacked anywhere, but the usual place is `/usr/lib/plan9`. In the root of the tree, run `./INSTALL`. This script builds the Plan 9 build program mk(1) if necessary, cleans all previously built object files and libraries out of the tree, rebuilds and installs everything, and then cleans up.
There are a few files in tree which have the root hard-coded in them. After the build, INSTALL edits these files to replace the string `/usr/lib/plan9` with the name of the root of the current tree.
Finally, INSTALL builds an HTML version of the manual and installs it in `/usr/lib/plan9/man`.
The installation can be thought of as two steps: build all the binaries, and then edit files as necessary to fix the references to the installation root. If necessary, these can be run separately. Given the `−b` flag, INSTALL performs only the first step. Given the `−c` flag, INSTALL performs only the second step. The first step can be done with the tree in a temporary work directory, but the second step must be done once the tree is in its final location. If you want to build the project in one location and then install into another location, use `−r` path to specify the final location of Plan9 tree. These flags are only necessary when trying to conform to the expectations of certain package management systems.
At the end of the installation, INSTALL prints suggested settings for the environment variables `$PLAN9` and `$PATH`.
INSTALL writes various autodetected settings to `/usr/lib/plan9/config`. The file `/usr/lib/plan9/LOCAL.config` is appended to `config` after this auto-detection and can be used to override the choices. If `LOCAL.config` contains a line `WSYSTYPE=nowsys` then the system is built without using X11. `LOCAL.config` may also list settings for `CC9` (the host C compiler) and `CC9FLAGS` (any additional flags to pass to the compiler). Values more complex than single words should be quoted with single quotes.
On most Linux systems, the X11 header packages need to be installed to build using X11. On Debian. the required packages are libfontconfig1-dev, libx11-dev, libxext-dev, and libxt-dev. On Ubuntu, it suffices to install xorg-dev.
INSTALL can safely be repeated to rebuild the system from scratch.
Once the system is built for the first time, it can be maintained and rebuilt using mk(1). To rebuild individual commands or libraries, run `mk install` and `mk clean` in the appropriate source directory (see src(1)).
FILES
| `/usr/lib/plan9/lib/moveplan9.files`
| the list of files that need to have `/usr/lib/plan9` edited out of them
`/usr/lib/plan9/lib/moveplan9.sh`
| the script that edits the files
`/usr/lib/plan9/src/mkmk.sh`
| the shell script used to build mk(1)
`/usr/lib/plan9/dist/manweb`
| the shell script that builds the HTML manual
`/usr/lib/plan9/man/index.html`
| the top-level page in the HTML version of the manual
`/usr/lib/plan9/install.log`
| logged output from the last run of INSTALL
`/usr/lib/plan9/install.sum`
| a summary of `install.log`
SEE ALSO
| intro(1), git(1)