summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuca Weiss2021-06-13 10:05:13 +0200
committerLuca Weiss2021-06-13 10:05:13 +0200
commite980efc72462f76959c8ff033fa078b653b68fca (patch)
treece8ceface2975d9601d5cae18a4189fcb7c29b45 /PKGBUILD
parent3009a0a43cf26ffdca8c473627a35132ae0b7062 (diff)
downloadaur-openrazer-git.tar.gz
openrazer-git: add python sanity check
Hopefully less issue reports because of weird python setups in the future...
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD12
1 files changed, 11 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 03d2c68f5791..f63764cba1fb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=openrazer-git
_pkgbase=openrazer
pkgname=('python-openrazer-git' 'openrazer-daemon-git' 'openrazer-driver-dkms-git' 'openrazer-meta-git')
-pkgver=2.6.0.r6.g2433ae8
+pkgver=3.0.1.r8.g851c32a5
pkgrel=1
pkgdesc="An entirely open source driver and user-space daemon that allows you to manage your Razer peripherals on GNU/Linux."
arch=('any')
@@ -19,6 +19,16 @@ pkgver() {
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ # Do a sanity check in the environment of the builder so the build process doesn't place files into a wrong directory.
+ # If you think this is incorrect you can always remove this from the PKGBUILD, but then please don't complain if it doesn't work.
+ if [ "$(which python3)" != "/usr/bin/python3" ]; then
+ echo "ERROR: Your 'python3' does not point to /usr/bin/python3 but to $(which python3), likely a custom environment like anaconda."
+ echo "Please build this package in a clean chroot (e.g. with https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot) or point your PATH variable to prefer /usr/bin/ temporarily."
+ return 1
+ fi
+}
+
package_python-openrazer-git() {
pkgdesc="Python library for accessing the Razer daemon from Python."
depends=('openrazer-daemon' 'python-numpy')