summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3822c9c27a9972743fcc4d513207b0361749dc50 (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
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Joe Davison <joe@warhaggis.com>
# Contributor: Wouter Wijsman <wwijsman@live.nl>

pkgname=minigalaxy-git
pkgver=1.4.1.r72.g1127c95
pkgrel=2
pkgdesc="A simple GOG client for Linux"
arch=(any)
url="https://github.com/sharkwouter/minigalaxy"
license=('GPL-3.0-or-later AND CC-BY-3.0')
depends=(
    gdk-pixbuf2
    glib2
    gtk3
    hicolor-icon-theme
    python
    python-gobject
    python-requests
    webkit2gtk-4.1
    )
makedepends=(
    git
    python-build
    python-installer
    python-setuptools
    python-wheel
    )
checkdepends=(
    dosbox
    innoextract
    python-coverage
    python-simplejson
    scummvm
    )
optdepends=(
    'dosbox: Use the system DOSBox installation'
    'innoextract: Extract Windows installers'
    'scummvm: Use the system ScummVM installation'
    'wine: Install Windows games'
    )
provides=(minigalaxy)
conflicts=(minigalaxy)
source=("git+https://github.com/sharkwouter/minigalaxy.git")
sha256sums=('SKIP')

pkgver() {
  cd "minigalaxy"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^wine.//;s/^v//;s/\.rc/rc/'
}

build() {
  cd "minigalaxy"
  python -m build --wheel --no-isolation
}

check() {
  cd "minigalaxy"
  LANG=C.UTF-8 python -m coverage run --source minigalaxy -m unittest discover -v tests
  LANG=C.UTF-8 python -m coverage report -m
}

package() {
  cd "minigalaxy"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 THIRD-PARTY-LICENSES.md "$pkgdir/usr/share/licenses/$pkgname/THIRD-PARTY-LICENSES.md"
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
  install -Dm644 CHANGELOG.md "$pkgdir/usr/share/doc/$pkgname/CHANGELOG.md"
}