st: generate terminfo when building & adopt

This commit is contained in:
meator 2022-07-21 21:50:12 +02:00 committed by classabbyamp
parent 98e51bb7b9
commit 621788f21d
3 changed files with 7 additions and 22 deletions

View File

@ -1,5 +0,0 @@
case "${ACTION}" in
post)
tic -sx usr/share/terminfo/s/st.terminfo
;;
esac

View File

@ -1,11 +0,0 @@
case "${ACTION}" in
pre)
rm usr/share/terminfo/s/st
rm usr/share/terminfo/s/st-bs
rm usr/share/terminfo/s/st-bs-256color
rm usr/share/terminfo/s/st-mono
rm usr/share/terminfo/s/st-meta
rm usr/share/terminfo/s/st-meta-256color
rm usr/share/terminfo/s/st-256color
;;
esac

View File

@ -1,14 +1,14 @@
# Template file for 'st'
pkgname=st
version=0.8.5
revision=1
revision=2
build_style=gnu-makefile
make_use_env=compliant
hostmakedepends="pkg-config"
makedepends="fontconfig-devel libX11-devel libXft-devel"
depends="ncurses st-terminfo-${version}_${revision}"
short_desc="Simple terminal implementation for X"
maintainer="Orphaned <orphan@voidlinux.org>"
maintainer="meator <meator.dev@gmail.com>"
license="MIT"
homepage="https://st.suckless.org"
distfiles="https://dl.suckless.org/${pkgname}/${pkgname}-${version}.tar.gz"
@ -17,19 +17,20 @@ checksum=ea6832203ed02ff74182bcb8adaa9ec454c8f989e79232cb859665e2f544ab37
pre_build() {
sed -i 's|Liberation Mono|Monospace|g' config.def.h
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
# We will use tic after install. See INSTALL.
vsed -i Makefile -e '/tic/d'
mkdir -p ${DESTDIR}/usr/share/terminfo
}
pre_install() {
export TERMINFO=${DESTDIR}/usr/share/terminfo
}
post_install() {
vinstall st.info 644 usr/share/terminfo/s st.terminfo
vdoc README
vlicense LICENSE
}
st-terminfo_package() {
short_desc+=" - terminfo data"
depends="ncurses"
pkg_install() {
vmove usr/share/terminfo
}