jobcore/kbd/PKGBUILD

76 lines
2.5 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=kbd
pkgver=2.5.1
pkgrel=02
pkgdesc="Keytable files and keyboard utilities"
url="http://www.kbd-project.org"
depends=('glibc' 'pam')
makedepends=('check' 'git' 'gettext' 'autoconf' 'automake')
source=(https://www.kernel.org/pub/linux/utils/${pkgname}/${pkgname}-${pkgver}.tar.gz
https://www.kernel.org/pub/linux/utils/kbd/${pkgname}-${pkgver}.tar.sign
'fix-euro2.patch'
'vlock.pam')
backup=('etc/pam.d/vlock')
provides=('vlock')
conflicts=('vlock')
replaces=('vlock')
prepare() {
cd ${pkgname}-${pkgver}
# 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 (see FS#13837)
# 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
# fix euro2 #28213
patch -Np1 -i ../fix-euro2.patch
autoreconf -if
}
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/kbd --mandir=/usr/share/man --enable-optional-progs
make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes
}
check() {
cd ${pkgname}-${pkgver}
# This test is expected to fail since kbd-fix-loadkmap-compat.patch modifies the binary format
sed -e 's|dumpkeys-bkeymap ||' -i tests/Makefile
make check
}
package() {
cd ${pkgname}-${pkgver}
make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes DESTDIR="${pkgdir}" install
install -Dm644 ../vlock.pam "${pkgdir}"/etc/pam.d/vlock
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL')
validpgpkeys=('7F2A3D07298149A0793C9A4EA45ABA544CFFD434') # Alexey Gladkov
sha256sums=(b3db018458ea7a19c54de9c5680532bd9c3c836d45fefbd20e7e8a49b8e81b1b # kbd-2.5.1.tar.gz
34031727a51396b2b37ffa1e318821940e10afdee48cc8fc635831f90405f217 # kbd-2.5.1.tar.sign
a5e0167b6a82a9eb4d581d56baab930c2d80f5541dc34630460b73e1115384b8 # fix-euro2.patch
5c2d377a87121e7c399534fb91e2ffc0cc1e75d44a8f07ee6f55c9c089bc81e4) # vlock.pam
## 29ba95ce1e671822beb5d470afea3eb05b8fb747f97dd2b1ef3a067d9bdfd3c8 kbd-2.5.1-02-x86_64.pkg.tar.lz