summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8b34a3f9606954ebdf102558efa4c65bba94196 (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: Josip Ponjavic <josipponjavic at gmail dot com>

pkgname=ulauncher-git
pkgver=2.0.14.r0.gbdf867f
pkgrel=1
pkgdesc='Convenient and fast way to launch your desktop applications.'
arch=('any')
url="http://ulauncher.io"
license=('GPL3')
depends=('gobject-introspection-runtime' 'libappindicator-gtk3' 'libkeybinder3' 'webkit2gtk'
         "python2-"{dbus,gobject,pyinotify,pysqlite,levenshtein,xdg})
makedepends=('git' 'npm' "python2-"{distutils-extra,setuptools})
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("ulauncher::git+https://github.com/Ulauncher/Ulauncher.git")
sha256sums=('SKIP')
 
pkgver() {
  cd ulauncher
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd ulauncher
  sed -i "s/%VERSION%/${pkgver%.*.*}/g" setup.py
  find -iname "*.py" | xargs sed -i 's=\(^#! */usr/bin.*\)python *$=\1python2='
}

build() {
  cd ulauncher
  python2 setup.py build
  sh build-utils/build-preferences.sh
}

package() {
  cd ulauncher
  install -Dm644 build/share/applications/ulauncher.desktop "$pkgdir/usr/share/applications/ulauncher.desktop"
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  sed -i 's=\(^#! */usr/bin.*\)python *$=\1python2=' "$pkgdir/usr/share/ulauncher/timer-shortcut/timer.py.src"
  rm -rf "$pkgdir"/usr/share/ulauncher/preferences/{no*,src,bow*,gul*,pack*}
}