void-packages/srcpkgs/kbd/template
jbu 824b8261d1 kbd: consistent backspace and delete for i386 maps
Imported from LFS (http://www.linuxfromscratch.org/lfs/view/development/chapter06/kbd.html)
The behaviour of the Backspace and Delete keys is not consistent across the keymaps in
the kbd package. This patch fixes the issue for i386 keymaps.
2015-05-13 14:17:00 +02:00

65 lines
2 KiB
Bash

# Template file for 'kbd'
pkgname=kbd
version=2.0.2
revision=5
build_pie=yes
build_style=gnu-configure
configure_args="--datadir=/usr/share/kbd --localedir=/usr/share/kbd/locale"
hostmakedepends="automake libtool gettext-devel flex pkg-config"
makedepends="pam-devel"
depends="kbd-data"
short_desc="Linux keyboard utilities"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://www.kbd-project.org/"
distfiles="http://www.kbd-project.org/download/kbd-${version}.tar.xz"
checksum=9dfddabf96012e329c4bebb96a21aeef7c3872f624e96e8156ba542b82aeb912
pre_configure() {
# Rename keymap files with the same names
# this is needed because when only name of keymap is specified
# oadkeys loads the first keymap it can find, which is bad
# this should be removed when upstream adopts the change
mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
mv data/keymaps/i386/olpc/es{,-olpc}.map
mv data/keymaps/i386/olpc/pt{,-olpc}.map
mv data/keymaps/i386/dvorak/no{,-dvorak}.map
mv data/keymaps/i386/fgGIod/trf{,-fgGIod}.map
mv data/keymaps/i386/colemak/{en-latin9,colemak}.map
# fixes from fedora
# 7-bit maps are obsolete; so are non-euro maps
cd 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
cd $wrksrc
sed -e '/^PKG_CHECK_MODULES.*/d' -i configure.ac
sed -e 's,tests ,,g' -i Makefile.am
$XBPS_FETCH_CMD http://git.alpinelinux.org/cgit/aports/plain/main/kbd/error.h
autoreconf -fi
}
post_install() {
# Remove keymaps for sun, amiga and atari.
for f in sun amiga atari; do
rm -rf ${DESTDIR}/usr/share/kbd/keymaps/${f}
done
}
kbd-data_package() {
short_desc+=" - keymaps, console fonts and unicode maps"
replaces="kbd<2.0.1_1"
noarch=yes
pkg_install() {
vmove usr/share/kbd/consolefonts
vmove usr/share/kbd/consoletrans
vmove usr/share/kbd/keymaps
vmove usr/share/kbd/unimaps
}
}