dd9d4a1979
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
44 lines
1.5 KiB
Bash
44 lines
1.5 KiB
Bash
# Template file for 'kbd'
|
|
pkgname=kbd
|
|
version=2.4.0
|
|
revision=1
|
|
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"
|
|
short_desc="Linux keyboard utilities"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://www.kbd-project.org/"
|
|
distfiles="${KERNEL_SITE}/utils/${pkgname}/${pkgname}-${version}.tar.xz"
|
|
checksum=55f0740458cfd3a84e775e50d7e8b92dc01846db1edad8e2411ccc293ece9b9f
|
|
replaces="kbd-data>=0"
|
|
|
|
post_patch() {
|
|
# Rename keymap files with the same names
|
|
# this is needed because when only name of keymap is specified
|
|
# loadkeys 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/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
|
|
}
|
|
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
|
|
}
|