archrelease: copy trunk to community-any
[ArchLinux/community.git] / displaycal / trunk / PKGBUILD
blobab89e55e79c39d351cc3a0c563509c6be6227816
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>
6 _pkgname=DisplayCAL
7 pkgname=displaycal
8 pkgver=3.9.10
9 pkgrel=2
10 pkgdesc="Open Source Display Calibration and Characterization powered by Argyll CMS (Formerly known as dispcalGUI)"
11 arch=(x86_64)
12 url="https://github.com/eoyilmaz/displaycal-py3"
13 license=(GPL3)
14 depends=(argyllcms dbus dbus-python glib2 python-certifi python-distro
15          python-numpy python-pillow python-send2trash python-wxpython
16          python-zeroconf)
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
22         3762e7be.patch)
23 sha256sums=('a031c355bd33b800b8f723df98d7bbc6e14a680d414591abef95f0b0baae807b'
24             'a392f409342e7eb7892f0341c550fd26a8a8e65672ed1f039adbf6f524ebd701')
26 prepare() {
27   cd ${_pkgname}-${pkgver}
28   patch -p1 -i ../3762e7be.patch # Fix build with Python 3.11
31 build() {
32   cd ${_pkgname}-${pkgver}
33   python -m build --wheel --no-isolation
36 package() {
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,},}