blob: ad9e2b765330bf1965346a936646c34f9ce5de57 (
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
|
# PKGBUILD generated by pipman
# Python package author: Luxonis <support@luxonis.com>
# AUR package author : Robin Trioux <robin@trioux.eu>
pkgname=python-depthai
pkgver=2.26.0.0
pkgrel=2
pkgdesc="DepthAI Python Library"
arch=('x86_64')
url="https://github.com/luxonis/depthai-python"
license=(MIT)
makedepends=("python" "python-build" "python-installer" "gcc-libs" "glibc" "curl" "sed" "cmake>=3.25")
depends=("python" "libusb")
optdepends=("mypy" "python-pyqt5" "python-psutil" "python-numpy" "python-opencv")
options+=(!strip)
core_version=$(echo "$pkgver" | sed 's/\.[^.]*$//') # Stripping last version number as it does not exist for depthai core
source=(
dephtai-python-$pkgver.tar.gz::"https://github.com/luxonis/depthai-python/archive/refs/tags/v$pkgver.tar.gz"
depthai-core-$core_version.tar.gz::"https://github.com/luxonis/depthai-core/releases/download/v$core_version/depthai-core-v$core_version.tar.gz"
"80-movidius.rules"
"pyproject.toml"
)
prepare() {
cd "$srcdir"
cp -f pyproject.toml depthai-python-$pkgver
cp -r depthai-core-v$core_version/* depthai-python-$pkgver/depthai-core/
}
build() {
# Prevent hunter C++ package manager from using users home
#export HUNTER_ROOT=$srcdir/hunter
#export HUNTER_BINARY_DIR=$srcdir/hunterdir
#mkdir -p $HUNTER_ROOT
#mkdir -p $HUNTER_BINARY_DIR
ncpu=$(nproc --all)
export MAKEFLAGS="-j$ncpu"
cd $srcdir/depthai-python-$pkgver
python -m build --wheel --no-isolation
}
package() {
cd $srcdir/depthai-python-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 "${srcdir}/80-movidius.rules" "$pkgdir/etc/udev/rules.d/80-movidius.rules"
install -Dm644 "${srcdir}/depthai-python-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
sudo udevadm control --reload-rules && sudo udevadm trigger
}
sha256sums=('fef1bf905288021aafa60b582617a5ceb57c12fe85e9b1994f2e28523b7aa281'
'7f1ef051f18f47ef109db9351fdf97e5240fa5d24043f1434e4a3c004ae6e063'
'06643091a944b1e562f8ba5ecf8011b473120c6256ba2a2ac9b85fe8c1bb30aa'
'a0b59fa6f09767cce0e5bd1f5097db4381a9ecb119304113fe0533db5c7e52b5')
|