summaryrefslogtreecommitdiff
path: root/community/onboard/PKGBUILD
blob: 8476b2c16224d69a3f3580288a2ec428803847b4 (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
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=onboard
pkgver=0.97.0
pkgrel=2
pkgdesc="On-screen keyboard useful on tablet PCs or for mobility impaired users"
arch=('i686' 'x86_64')
url="https://launchpad.net/onboard"
license=('GPL')
depends=('python2-cairo' 'dbus-python' 'python2-gobject' 'libwnck3' 'python2-virtkey' 'desktop-file-utils' 'dconf' 'hicolor-icon-theme' 'xdg-utils')
makedepends=('python-distutils-extra')
optdepends=('at-spi2-atk: auto-show when editing text'
            'mousetweaks: hover click with mouse')
options=('!emptydirs')
install=$pkgname.install
source=(http://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz
        fix_unicode_translations.patch
        fix_encoding_mismatch.patch)
md5sums=('258bf6653a840c54ce1b4898d31fb775'
         '73d71d019dc27e6ac8d479ab3dd0ab21'
         '8c7f6f31547e1454725ded8090cbdc41')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # https://bugs.launchpad.net/onboard/+bug/933030
  patch -Np0 -i "$srcdir/fix_unicode_translations.patch"

  # https://bugs.launchpad.net/onboard/+bug/958385
  patch -Np1 -i "$srcdir/fix_encoding_mismatch.patch"

  sed -i 's/\"python\"/\"python2\"/g' scripts/sokSettings.py

  python2 setup.py install --root=$pkgdir/ --optimize=1
}

package() {
  cd "$pkgdir"

  find . -type f -name *.py | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
}