summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aafb0e73d39048086832f0254770225237f0596b (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Maintainer: BlueDrink9 <bluedrink9+aur@gmail.com>
# Maintainer: Arnaud Dovi <mr.dovi@gmail.com>

pkgname=('autokey-git')
pkgver=0.96.0.r0.fbcc72b
pkgrel=1
pkgdesc='A desktop automation utility for Linux and X11 - GTK & Qt frontends'
arch=('x86_64')
url='https://github.com/autokey/autokey'
license=('GPL3')
provides=(
  'autokey'
  'autokey-gtk'
  'autokey-qt'
)
conflicts=(
  'autokey-common'
  'autokey-gtk'
  'autokey-qt'
)
depends=(
  'dbus-python'
  'gtksourceview3'
  'gvfs'
  'kdialog'
  'libappindicator-gtk3'
  'libnotify'
  'python-cairo'
  'python-gobject'
  'python-pyhamcrest'
  'python-pyinotify'
  'python-qscintilla-qt5'
  'python-xlib'
  'qt5ct'
  'wmctrl'
  'xapp'
  'xfconf'
  'zenity'
)
makedepends=(
  'coreutils'
  'git'
  'python-setuptools'
  'sed'
)
optdepends=(
  'gnome-themes-extra'
  'gtk-engine-murrine'
  'nvidia-utils'
)
source=(
  'git+https://github.com/autokey/autokey.git#branch=master
'
)
sha512sums=(
  'SKIP'
)
pkgname2="${pkgname/-git/}"
stop='\e[m'
color="\e[33m"
bold='\e[1m'
prefix=" ${bold}${color}==>$stop "



pkgver() {
  cd "$pkgname2" || return
  printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
  cd "$pkgname2" || return
}

build() {
  cd "$pkgname2" || return
  echo -e "${prefix}Building AutoKey"

  python setup.py build

  # copying sample user scripts
  echo -e "${prefix}${prefix}Copying sample user scripts"
  [ -d lib/autokey/configmanager/predefined_user_scripts ] && cp -r lib/autokey/configmanager/predefined_user_scripts build/lib/autokey/configmanager/

  # [FIXME - is this still necessary? ] remove shebang from python libraries
  #for lib in $(find lib/autokey/ -name "*.py"); do
  #  sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
  #  touch -r $lib $lib.new &&
  #  mv $lib.new $lib
  #done
}

package() {
  cd "$pkgname2" || return
  echo -e "${prefix}Packaging AutoKey"

  export PYTHONHASHSEED=0
  python setup.py install --root="$pkgdir/" --optimize=1 --skip build
}