# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kbd pkgver=1.15.5 pkgrel=0 pkgdesc="Tools for configuring the console (keyboard, virtual terminals, etc.)" url="http://ftp.altlinux.org/pub/people/legion/kbd" arch="all" license="GPLv2+" depends="kbd-misc" makedepends="bison flex autoconf automake linux-pam-dev" install="" subpackages="$pkgname-misc $pkgname-doc" source="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-$pkgver.tar.gz " _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 && autoreconf || return 1 # fixes from fedora # 7-bit maps are obsolete; so are non-euro maps cd "$_builddir"/data/keymaps/i386 mv qwerty/fi.map qwerty/fi-old.map cp qwerty/fi-latin9.map qwerty/fi.map 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 --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" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/kbd "$subpkgdir"/lib/ } md5sums="34c71feead8ab9c01ec638acea8cd877 kbd-1.15.5.tar.gz"