Compile terminfo and install for ncurses. More information: https://pubs.opengroup.org/onlinepubs/007908799/xcurses/terminfo.html.
tic -xe {{terminal}} {{path/to/terminal.info}}
tic -c {{path/to/terminal.info}}
tic -D