summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 57d302303eddce2e43a844b473cf72c2484c54e6 (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=python-clickgen1
_name=clickgen
pkgver=1.2.0
pkgrel=1
pkgdesc="X11 & Windows cursor building API (legacy 1.X.X version)"
arch=('x86_64')
url="https://github.com/ful1e5/clickgen"
license=('MIT')
depends=('python-pillow' 'libx11' 'libxcursor' 'libpng')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
provides=('xcursorgen.so' 'python-clickgen')
conflicts=('python-clickgen')
source=("$_name-$pkgver.tar.gz::https://github.com/ful1e5/clickgen/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('26d5fccced30a635e9a113bac2c71f7fcea95cb73cd904ae1405c16ef172b88f')

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation

  make -C src/xcursorgen
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  install -Dm644 src/xcursorgen/xcursorgen.so -t "${pkgdir}${site_packages}/$_name/"

  install -d "$pkgdir/usr/share/licenses/python-clickgen"
  ln -s "$site_packages/$_name-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/python-clickgen/"
}