mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
bbs.service.sample becomes bbs.service.in. make builds bbs.service from it with the path of BINDIR, and make install puts it in SYSTEMD_UNIT_DIR ($(PREFIX)/lib/systemd/system), as D-Modem does for dmodem-ari.service. The unit now waits for network-online.target and, when they are there, the database servers and dmodem-login-authd. SupplementaryGroups=asterisk is a comment, because the unit does not start on a host without that group. Running.md gives the steps after make install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRV8YPyMUdSM1QgsczH
44 lines
1.9 KiB
Markdown
44 lines
1.9 KiB
Markdown
This page shows how to build bbs from source. You must have Go 1.26 or later.
|
|
|
|
```
|
|
make # or: go build ./cmd/bbs
|
|
make test
|
|
make install # installs /usr/local/bin/bbs, the systemd unit bbs.service,
|
|
# and /etc/bbs/bbs.conf if there is none
|
|
```
|
|
|
|
bbs does not use cgo. Thus, you do not have to configure a C compiler. All
|
|
database drivers are in the binary. SQLite is [modernc.org/sqlite](https://modernc.org/sqlite),
|
|
PostgreSQL is [pgx](https://github.com/jackc/pgx), and MySQL and MariaDB are
|
|
[go-sql-driver](https://github.com/go-sql-driver/mysql).
|
|
|
|
## go3270
|
|
|
|
bbs uses the fork of go3270 from the D-Modem suite,
|
|
[D-Modem/go3270](https://github.com/D-Modem/go3270) (Go module
|
|
`github.com/D-Modem/go3270`). This fork adds 3270 query replies and graphics.
|
|
While that repository is private, Go must get it from GitHub with your
|
|
own credentials:
|
|
|
|
```
|
|
export GOPRIVATE=github.com/D-Modem/* # the Makefile sets this for you
|
|
git config --global url."git@github.com:".insteadOf "https://github.com/" # or use a token
|
|
```
|
|
|
|
`make install` uses these variables:
|
|
|
|
| Variable | Default | What it sets |
|
|
| --- | --- | --- |
|
|
| `PREFIX` | `/usr/local` | The base of the other directories |
|
|
| `BINDIR` | `$(PREFIX)/bin` | The directory of the bbs program. The `ExecStart=` line of bbs.service uses it |
|
|
| `SYSTEMD_UNIT_DIR` | `$(PREFIX)/lib/systemd/system` | The directory of bbs.service. systemd reads units from `/usr/local/lib/systemd/system` and `/usr/lib/systemd/system` |
|
|
| `DESTDIR` | empty | A directory before all paths, for packages |
|
|
|
|
`make install` replaces bbs.service each time. Thus, do not edit the
|
|
installed unit. Put your changes in a drop-in (`systemctl edit bbs`).
|
|
`make install` does not replace an existing `/etc/bbs/bbs.conf`.
|
|
`make install` does not run `systemctl`. Refer to
|
|
[Running](Running#under-systemd) for the subsequent steps.
|
|
|
|
**See also:** [Running](Running), [Development](Development)
|