terminfo: add terminfo database

Tested by:	manu, jbeich
This commit is contained in:
Baptiste Daroussin 2021-02-23 17:17:32 +01:00
parent 0af562d7e1
commit 2a50a9de83
2 changed files with 35 additions and 0 deletions

View File

@ -26,6 +26,7 @@ SUBDIR= ${_colldef} \
${_syscons} \
tabset \
termcap \
terminfo \
${_timedef} \
${_vt} \
${_zoneinfo}

34
share/terminfo/Makefile Normal file
View File

@ -0,0 +1,34 @@
PACKAGE= runtime
.PATH: ${SRCTOP}/contrib/ncurses/misc
TINFOBUILDDIR= ${.OBJDIR}/builddir
CLEANDIRS+= builddir
.include <src.tools.mk>
.if !defined(_SKIP_BUILD)
all: terminfo
.endif
META_TARGETS+= terminfo install-terminfo
terminfo: terminfo.src
mkdir -p ${TINFOBUILDDIR}
${TIC_CMD} -x -o ${TINFOBUILDDIR} ${.ALLSRC}
.if make(*install*)
TINFOS!= cd ${TINFOBUILDDIR} && find * -type f | LC_ALL=C sort
TINFOSDIRS= ${TINFOS:C/(.).*/\1/g:O:u}
.endif
beforeinstall: install-terminfo
install-terminfo:
mkdir -p ${DESTDIR}/usr/share/terminfo
cd ${DESTDIR}/usr/share/terminfo; mkdir -p ${TINFOSDIRS}
.for f in ${TINFOS}
${INSTALL} ${TAG_ARGS} \
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${TINFOBUILDDIR}/${f} ${DESTDIR}/usr/share/terminfo/${f}
.endfor
.include <bsd.prog.mk>