df09c1c55d
481279c adds packaging/systemd/{daedalus-v4l2.service,modules-load} to
the upstream tree. This commit wires those into both the Arch
(PKGBUILD + .install) and Debian (build-deb.sh + postinst/prerm/postrm)
package layouts so that a fresh install of daedalus-v4l2 + daedalus-
v4l2-dkms on a Pi 5 leaves the kernel module loaded at next boot AND
the userspace broker daemon enabled — no manual modprobe / systemctl
enable dance needed.
arch/daedalus-v4l2:
* pkgver 0.1.0.r18.481279c, pkgrel reset to 1 (new upstream pin).
* Dropped 'systemd-libs' from depends — daemon doesn't link
libsystemd (no sd_notify); the .service unit is consumed by
systemd-the-init, no link-time dep required.
* package() now installs the .service to
/usr/lib/systemd/system/daedalus-v4l2.service and the modules-
load drop-in to /usr/lib/modules-load.d/daedalus-v4l2.conf.
* New .install file: post_install/post_upgrade run daemon-reload +
enable + systemd-modules-load + try-restart on upgrade; pre/post
remove tear down cleanly. No auto-start — operator decides.
arch/daedalus-v4l2-dkms:
* pkgver bump to 481279c, pkgrel reset to 1. Kernel module itself
is bit-identical to f0cd29a (commit only touches packaging/) but
bumping in lockstep keeps DKMS source-tree pkgver matched to the
userspace pkgver so /etc/modules-load.d points at a module that
actually exists.
debian/daedalus-v4l2:
* Same bump 481279c, PKGREL=1.
* build-deb.sh stages /lib/systemd/system/ + /usr/lib/modules-load.d/
and installs both files.
* Generates DEBIAN/postinst that runs daemon-reload, enables the
service, triggers systemd-modules-load, and conditionally starts
the service iff /dev/daedalus-v4l2 is already present (uses the
same ConditionPathExists= guard as the unit file so apt install
doesn't fail loudly on a host where dkms hasn't built yet).
* Generates DEBIAN/prerm (stop + disable on remove) and
DEBIAN/postrm (daemon-reload).
debian/daedalus-v4l2-dkms:
* Lockstep version bump, PKGREL=1. Postinst (loud-warn-on-missing-
headers) unchanged.
Verified the SHA via local rev-parse against ~/src/daedalus-v4l2 —
481279c is the "packaging/systemd: ship daedalus-v4l2.service +
modules-load drop-in" commit on main.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
72 lines
2.7 KiB
Bash
72 lines
2.7 KiB
Bash
# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
|
|
#
|
|
# daedalus-v4l2-dkms — DKMS package for the daedalus_v4l2 out-of-tree
|
|
# kernel module (V4L2 stateless decoder shim for Pi 5 / CM5).
|
|
#
|
|
# Pair to daedalus-v4l2 (userspace daemon). When loaded, the module
|
|
# registers /dev/videoNN (V4L2 m2m) + /dev/mediaNN (media controller) +
|
|
# /dev/daedalus-v4l2 (chardev to the userspace daemon). Userspace
|
|
# clients drive the V4L2 m2m + request API path; the daemon does the
|
|
# actual FFmpeg-backed decode on /dev/daedalus-v4l2.
|
|
#
|
|
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
|
|
# Sibling userspace package: daedalus-v4l2
|
|
# Sibling consumer: libva-v4l2-request-fourier
|
|
|
|
pkgname=daedalus-v4l2-dkms
|
|
_module=daedalus_v4l2
|
|
|
|
# Same pin as arch/daedalus-v4l2 — keep kernel module + daemon
|
|
# bit-versioned together so the chardev wire protocol stays in sync.
|
|
_commit=481279c9bffd19e32c8f3299897e9b63fc5a24aa
|
|
|
|
pkgver=0.1.0.r18.481279c
|
|
pkgrel=1 # reset for new upstream pin (481279c — Phase 8.13 close)
|
|
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
|
|
arch=('any')
|
|
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
|
|
license=('GPL-2.0-or-later')
|
|
depends=('dkms')
|
|
makedepends=('git')
|
|
install="${pkgname}.install"
|
|
|
|
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
|
|
"dkms.conf"
|
|
"${pkgname}.install")
|
|
sha256sums=('SKIP'
|
|
'SKIP'
|
|
'SKIP')
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/daedalus-v4l2"
|
|
printf '0.1.0.r%s.%s' \
|
|
"$(git rev-list --count HEAD)" \
|
|
"$(git rev-parse --short=7 HEAD)"
|
|
}
|
|
|
|
package() {
|
|
local _src="${pkgdir}/usr/src/${_module}-${pkgver}"
|
|
|
|
install -dm755 "${_src}"
|
|
|
|
# Install the kernel/ subdir and embed the shared proto header in
|
|
# the same tree. The in-tree Makefile uses
|
|
# `ccflags-y += -I$(src)/../include` (assuming the parent
|
|
# daedalus-v4l2 layout); for DKMS we flatten by copying the header
|
|
# into kernel/include/ and patching the Makefile to point there.
|
|
cp -r "${srcdir}/daedalus-v4l2/kernel/." "${_src}/"
|
|
install -Dm644 "${srcdir}/daedalus-v4l2/include/daedalus_v4l2_proto.h" \
|
|
"${_src}/include/daedalus_v4l2_proto.h"
|
|
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "${_src}/Makefile"
|
|
|
|
# dkms.conf at the root of the source tree (DKMS convention).
|
|
# Substitute #MODULE_VERSION# placeholder with the actual pkgver
|
|
# so dkms install/uninstall match what's on disk.
|
|
install -Dm644 "${srcdir}/dkms.conf" "${_src}/dkms.conf"
|
|
sed -i "s/#MODULE_VERSION#/${pkgver}/" "${_src}/dkms.conf"
|
|
|
|
# License
|
|
install -Dm644 "${srcdir}/daedalus-v4l2/kernel/daedalus_v4l2_main.c" \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/SPDX-HEADER"
|
|
}
|