makedepends=(check)

description="The Kbd package contains key-table files, console fonts, and keyboard utilities"
url="ftp://devel.altlinux.org/legion/kbd/"

packager="Grat-OS Team"
maintainer="Grat-OS Team"

name=kbd
version=2.6.4
release=1

source=(https://www.kernel.org/pub/linux/utils/kbd/kbd-$version.tar.xz)

build() {
  cd kbd-$version

  #patch -Np1 -i ../$name-$version-backspace-1.patch

  sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure
  sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in

  if [[ -d /tools ]]; then
    PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure --prefix=/usr --disable-vlock
  else
    ./configure --prefix=/usr --disable-vlock
  fi

  make
  make check
  make DESTDIR=$PKG install

  mkdir -pv $PKG/usr/share/doc/$name-$version
  cp -R -v docs/doc/* \
  $PKG/usr/share/doc/$name-$version
}
