# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kbd pkgver=2.0.3 pkgrel=1 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 $pkgname-vlock" source="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-$pkgver.tar.gz error.h " _builddir="$srcdir"/kbd-$pkgver prepare() { # apply patches (if any) default_prepare || 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 \ --disable-nls \ --prefix=/usr \ --datadir=/usr/share \ --htmldir=/usr/share/html/$pkgname \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 # ro_win.map.gz is useless rm -f "$pkgdir"/usr/share/keymaps/i386/qwerty/ro_win.map.gz # Create additional name for Serbian latin keyboard ln -s sr-cy.map.gz "$pkgdir"/usr/share/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"/usr/share/keymaps/i386/qwerty/ko.map.gz # Install html documentation mkdir -p "$pkgdir"/usr/share/html/$pkgname mv docs/doc/*.html "$pkgdir"/usr/share/html/$pkgname/ || return 1 # Replace busybox setfont utility. mkdir -p "$pkgdir"/usr/sbin mv "$pkgdir"/usr/bin/setfont "$pkgdir"/usr/sbin/ || return 1 # Link open to openvt ln -s openvt "$pkgdir"/usr/bin/open } vlock() { pkgdesc="$pkgname vlock implemantation" depends= # This is the only binary needing linux-pam moving this to a # subpackage reduce the amount of depencies of the kbd package. mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/vlock \ "$subpkgdir"/usr/bin/ || return 1 } misc() { pkgdesc="Data for kbd package" arch="noarch" depends= mkdir -p "$subpkgdir"/usr/share/ for dir in consolefonts consoletrans keymaps unimaps; do mv "$pkgdir"/usr/share/${dir} "$subpkgdir"/usr/share/ || return 1 done } md5sums="d636ee56f35233b5cd6f855c08372489 kbd-2.0.3.tar.gz 1a5b152db18674deec07ab7c6209267a error.h" sha256sums="1933a9a9607a88fddb798f4c1df44ca81257733756c480567ceb52a41de273b9 kbd-2.0.3.tar.gz 0124ef103407469af4ea19884e2ed7e4546f08b58c129e1e8ef36569831f4b36 error.h" sha512sums="7d9a8aa74de45796b8045ddbeaacd1b8fb9e9fd297c18ff382817c40d86bca421978664b215de0b7f79f316437d0c8bc259a113bfb92eb06d106f044339012d8 kbd-2.0.3.tar.gz c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h"