summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b78c203c58c83e6625080b59696c1a1ae1ecb029 (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: Juliette Monsel <j_4321 at protonmail dot com>
pkgname=python-pynput
_name=${pkgname#python-}
pkgver=1.7.4
pkgrel=1
pkgdesc="Python library to monitor and control user input devices"
arch=('any')
url="https://github.com/moses-palmer/pynput"
license=('LGPL3')
depends=('python-xlib' 'python-six' 'python-evdev')
makedepends=('python-setuptools')
source=("https://pypi.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz"
        'setup.patch')
sha256sums=('16fecc4d1e53a28fb7c669c79e189c3f2cde14a08d6b457c3da07075c82f3b4c'
            'c519290a88baa3e15be4bb6cff4d665a020b9e0c8c1241749670d58a48b07e2c')

prepare() {
  cd "$_name-$pkgver"
  patch -Np1 -i $srcdir/setup.patch
}

build() {
  cd "$_name-$pkgver"
  python setup.py build
}

package() {
  cd "$_name-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1 --skip-build

  # Fix permissions
  find "$pkgdir" -type d -exec chmod -v 0755 {} \;
  find "$pkgdir" -type f -exec chmod -v 0644 {} \;
}