summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a99731ccc38fb20c8c2088edb8c498d9d2bda8f0 (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
# Maintainer:
# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Simon Zack <simonzack@gmail.com>
# Contributor: Toasty <toastyyogurttime@gmail.com>
# Contributor: Stephen304 <stephen304@gmail.com>

_name="cups-of-caffeine"
_pkgname="caffeine"
pkgname="$_pkgname"
pkgver=2.9.12
pkgrel=2
pkgdesc="Keep your computer awake"
url="https://launchpad.net/caffeine"
license=('GPL-3.0-or-later')
arch=('any')

depends=(
  'python'
  'python-setuptools'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
)
optdepends=(
  'libayatana-appindicator: caffeine-indicator (tray applet) support'
)

_pkgsrc="$_name-$pkgver"
_pkgext="tar.gz"
source=("$_pkgname-$pkgver.$_pkgext"::"https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.$_pkgext")
sha256sums=('84ee54e83e8007b4a455b5f3e61ce97c0332c064fe5b39abd29f821f9d438f83')

build() {
  cd "$_pkgsrc"
  python -m build --no-isolation --wheel --skip-dependency-check
}

check() {
  cd "$_pkgsrc"
  python setup.py check
}

package() {
  depends+=(
    'python-xlib'
    'python-gobject'

    ## AUR
    'python-ewmh'
  )

  cd "$_pkgsrc"
  python -m installer --destdir="$pkgdir" dist/*.whl
}