summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngar <ingar@telenet.be>2024-04-14 18:59:09 +0200
committerIngar <ingar@telenet.be>2024-04-14 18:59:09 +0200
commit06a470da771c87c21569eb86525c564298126c4e (patch)
treeaec324e5e6d098772e003935d30b2464721a5438
parent4256f44e5895edb04566b10e41fc648068a42633 (diff)
Added udev rules so users in the video group can use the camera.
-rw-r--r--PKGBUILD14
-rw-r--r--rpicam.rules3
2 files changed, 13 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cc644ad..206b175 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,14 @@ pkgrel=1
pkgdesc="Camera utilities for the Raspberry Pi"
arch=('aarch64')
url='https://github.com/raspberrypi/rpicam-apps'
-source=("https://github.com/raspberrypi/rpicam-apps/releases/download/v${pkgver}/rpicam-apps-${pkgver}.tar.xz")
-sha256sums=("c5415249eb8216a5c7063d31c713ba84cac88103f65ae0dcf097f1839156102e")
+source=(
+ "https://github.com/raspberrypi/rpicam-apps/releases/download/v${pkgver}/rpicam-apps-${pkgver}.tar.xz"
+ "rpicam.rules"
+)
+sha256sums=(
+ "c5415249eb8216a5c7063d31c713ba84cac88103f65ae0dcf097f1839156102e"
+ "4045e41e24d8c3e247b667a66bc9eee13918f599f464003dde25ca55ed7bb995"
+)
depends=(
boost
libdrm
@@ -41,7 +47,7 @@ build()
package()
{
+ install --mode=644 -D rpicam.rules "${pkgdir}/etc/udev/rules.d/rpicam.rules"
cd rpicam-apps-${pkgver}
- DESTDIR="$pkgdir" ninja -C build install
+ DESTDIR="${pkgdir}" ninja -C build install
}
-
diff --git a/rpicam.rules b/rpicam.rules
new file mode 100644
index 0000000..41fb331
--- /dev/null
+++ b/rpicam.rules
@@ -0,0 +1,3 @@
+# give users in the video group access to the rpi camera
+# see https://github.com/raspberrypi/rpicam-apps/issues/218
+SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"