summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c38e4ffe0d21cb89490b6b93ffcace7b06fca6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer:  Vincent Grande <shoober420@gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=kbd-git
pkgver=2.4.0
pkgrel=1
pkgdesc="Keytable files and keyboard utilities"
arch=('x86_64')
url="http://www.kbd-project.org"
license=('GPL')
depends=('glibc' 'pam')
makedepends=('check' 'git')
source=(git+https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git
        'fix-euro2.patch'
	'vlock.pam')
provides=('vlock' 'kbd')
conflicts=('vlock' 'kbd')
replaces=('vlock')
sha256sums=('SKIP'
            'a5e0167b6a82a9eb4d581d56baab930c2d80f5541dc34630460b73e1115384b8'
            '5c2d377a87121e7c399534fb91e2ffc0cc1e75d44a8f07ee6f55c9c089bc81e4')
#validpgpkeys=('7F2A3D07298149A0793C9A4EA45ABA544CFFD434' #Alexey Gladkov)

pkgver() {
  cd kbd
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd kbd
  # 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
}

build() {
  cd kbd

  ./autogen.sh
  ./configure --prefix=/usr --datadir=/usr/share/kbd --mandir=/usr/share/man
  make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes
}

#check() {
#  cd kbd

# 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 kbd
  make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes DESTDIR="${pkgdir}" install
  install -Dm644 ../vlock.pam "${pkgdir}"/etc/pam.d/vlock
}