1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
3 # Contributor: Cedric Girard <girard.cedric@gmail.com>
4 # Contributor: foxbunny <bg.branko@gmail.com>
10 pkgdesc="Open Source Display Calibration and Characterization powered by Argyll CMS (Formerly known as dispcalGUI)"
12 url="https://github.com/eoyilmaz/displaycal-py3"
14 depends=(argyllcms dbus dbus-python glib2 python-certifi python-distro
15 python-numpy python-pillow python-send2trash python-wxpython
17 makedepends=(libxrandr libxxf86vm python-build python-installer
18 python-setuptools python-wheel)
19 optdepends=('gnome-color-manager: profile installation for GNOME'
20 'colord-kde: profile installation for KDE Plasma')
21 source=(${url}/releases/download/${pkgver}/${_pkgname}-${pkgver}.tar.gz
23 sha256sums=('a031c355bd33b800b8f723df98d7bbc6e14a680d414591abef95f0b0baae807b'
24 'a392f409342e7eb7892f0341c550fd26a8a8e65672ed1f039adbf6f524ebd701')
27 cd ${_pkgname}-${pkgver}
28 patch -p1 -i ../3762e7be.patch # Fix build with Python 3.11
32 cd ${_pkgname}-${pkgver}
33 python -m build --wheel --no-isolation
37 cd ${_pkgname}-${pkgver}
38 python -m installer --destdir="${pkgdir}" dist/*.whl
39 # https://github.com/eoyilmaz/displaycal-py3/issues/117
40 install -d "${pkgdir}"/etc/xdg/autostart
41 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
42 mv "${pkgdir}"/{$site_packages/build/.config,etc/xdg}/autostart/z-displaycal-apply-profiles.desktop
43 rmdir "${pkgdir}"/$site_packages/build/{.config{/autostart,},}