# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kbd pkgver=2.0.2 pkgrel=0 pkgdesc="Tools for configuring the console (keyboard, virtual terminals, etc.)" url="http://ftp.altlinux.org/pub/people/legion/kbd" arch="all" license="GPL2+" depends="kbd-misc" makedepends="linux-headers bison flex autoconf automake linux-pam-dev check-dev" install="" subpackages="$pkgname-misc $pkgname-doc" source="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-$pkgver.tar.gz 0001-Replace-u_short-with-unsigned-short.patch 0002-Fix-required-header-includes.patch 0003-Only-inluclude-kernel-headers-with-glibc.patch error.h " _builddir="$srcdir"/kbd-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # aclocal -I m4 && automake --add-missing && autoreconf || return 1 # install our error.h cp "$srcdir"/error.h . || return 1 # fixes from fedora # 7-bit maps are obsolete; so are non-euro maps cd "$_builddir"/data/keymaps/i386 cp qwerty/pt-latin9.map qwerty/pt.map cp qwerty/sv-latin1.map qwerty/se-latin1.map mv azerty/fr.map azerty/fr-old.map cp azerty/fr-latin9.map azerty/fr.map cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias # Rename conflicting keymaps mv dvorak/no.map dvorak/no-dvorak.map mv fgGIod/trf.map fgGIod/trf-fgGIod.map mv olpc/es.map olpc/es-olpc.map mv olpc/pt.map olpc/pt-olpc.map mv qwerty/cz.map qwerty/cz-qwerty.map } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --datadir=/lib/kbd \ --localedir=/usr/share/locale \ --disable-nls \ --mandir=/usr/share/man \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la # ro_win.map.gz is useless rm -f "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ro_win.map.gz # Create additional name for Serbian latin keyboard ln -s sr-cy.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/sr-latin.map.gz # The rhpl keyboard layout table is indexed by kbd layout names, # so we need a Korean keyboard ln -s us.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ko.map.gz # Move binaries which we use before /usr is mounted to /bin. mkdir -p "$pkgdir"/bin for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop loadkeys ; do mv "$pkgdir"/usr/bin/$binary "$pkgdir"/bin/ || return 1 done # Link open to openvt ln -s openvt "$pkgdir"/usr/bin/open } misc() { pkgdesc="Data for kbd package" arch="noarch" depends= mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/kbd "$subpkgdir"/lib/ } md5sums="f1f75f0dd5f7dde89ce47585274366f8 kbd-2.0.2.tar.gz 7945e2d7f13cc2896233bf5e1de8e4e2 0001-Replace-u_short-with-unsigned-short.patch 4e04e0c7307e89193b7dc2cd889be0a5 0002-Fix-required-header-includes.patch 31027a70335ff0a5e9f3b779d70920ce 0003-Only-inluclude-kernel-headers-with-glibc.patch 1a5b152db18674deec07ab7c6209267a error.h" sha256sums="b1e4c796601039d3b63da908c27431a36e7af06d4d964cd3f8821a880eb3c021 kbd-2.0.2.tar.gz d55432213b14d677af73eb5b919327bd9fe03dd6fcad059f5d345901d6029e96 0001-Replace-u_short-with-unsigned-short.patch e1e6c482d4c00ace48938f4888a23992ae3cc16674a0d5d1f1f07eb57afac550 0002-Fix-required-header-includes.patch e2d49d91309b6b2450de7aa32be1807284958cf66cd9e4ee823dbb0afaf11772 0003-Only-inluclude-kernel-headers-with-glibc.patch 0124ef103407469af4ea19884e2ed7e4546f08b58c129e1e8ef36569831f4b36 error.h" sha512sums="68832bddd6b91693110d1e26d3911bcd3c151003f83905571dcba05480ba484adc5bfe7d31a3b987bd930703d153724fb8eb9ae7cc26cff97be65a4f5ccb547b kbd-2.0.2.tar.gz 0487a90382201a162405618e983fb2a227c6f07258a498c6850b5ddcd36d5c836446b4c7883a494421a3dc34a60b164bb6ce10350c777bc0cb1f610d4fe6a0ca 0001-Replace-u_short-with-unsigned-short.patch c3689db8777566dd92c6d38fadc1d8676d00926c711d5bb8b561547aaeb4d93b67998ac3f2b17faaa475e7c85a9e51c71b87cd92b6099ee118c19de58bc195aa 0002-Fix-required-header-includes.patch 13af714a54562ebc1ac6b19f24f75704b452faf543705e9e6a8c53e8080f5edffb49ddde26a876da71e6ca34b275c3407525d6d3446c543181d2eff2b784541b 0003-Only-inluclude-kernel-headers-with-glibc.patch c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h"