update README

This commit is contained in:
Michael F. Lamb 2023-02-26 22:58:45 -08:00
parent 0eba832f8a
commit c450eba2ef
1 changed files with 33 additions and 0 deletions

View File

@ -66,6 +66,8 @@ current state of the work tree.
## Installation
### For all users, using root access
This section guides you through installing the required dependencies, compiling
a binary, and then installing the binary. By default, `repo2html` installs
into the `/usr/local/bin` directory.
@ -76,9 +78,40 @@ into the `/usr/local/bin` directory.
4. As root, run `make install` to copy the `repo2html` binary into the
`/usr/local/bin` directory.
### For one user, without root access
If you prefer, you can compile and install without root access.
1. Set the following environment variables appropriately.
The following will install executables at `~/bin` and chicken libraries at `~/var/lib/chicken`.
(Verify the location of the `CHICKEN_REPOSITORY_PATH` on your system, as it might not be `/var/lib/chicken/11`):
```
export CHICKEN_INSTALL_PREFIX="$HOME"
export CHICKEN_REPOSITORY_PATH="$HOME"/var/lib/chicken:/var/lib/chicken/11
export CHICKEN_INSTALL_REPOSITORY="$HOME"/var/lib/chicken
```
2. Ensure you're in the `repo2html` git repository.
3. Run `make dependencies` to install the required Chicken Scheme eggs.
4. Run `make` to compile a static `repo2html` binary in the current directory.
5. Run `make install` to copy the `repo2html` binary into the `~/bin` directory.
<!-- FIXME this part isn't true anymore since we broke the source code up into modules.
**Note**: If you want to use `main.scm` as the `repo2html` executable, instead
of compiling a static binary file, then run
`cp main.scm /usr/local/bin/repo2html` as root.
-->
### Compiling for older systems
A Dockerfile is included that will build `repo2html` using Debian 11 (bullseye) running glibc-2.31.
The resulting binary should be compatible with systems running both old and newer versions of glibc.
1. Ensure docker is installed (`sudo apt install docker.io`)
2. Run `make compile-on-debian-11`
It takes a while and downloads a lot.
## Templates