diff --git a/anda/fusion/kmod-v4l2loopback/anda.hcl b/anda/fusion/kmod-v4l2loopback/anda.hcl new file mode 100644 index 0000000000..e5fb6fbc2b --- /dev/null +++ b/anda/fusion/kmod-v4l2loopback/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "kmod-v4l2loopback.spec" + } +} diff --git a/anda/fusion/kmod-v4l2loopback/kmod-v4l2loopback.spec b/anda/fusion/kmod-v4l2loopback/kmod-v4l2loopback.spec new file mode 100644 index 0000000000..23b8085ed9 --- /dev/null +++ b/anda/fusion/kmod-v4l2loopback/kmod-v4l2loopback.spec @@ -0,0 +1,60 @@ +# https://github.com/rpmfusion/v4l2loopback-kmod/blob/el7/v4l2loopback-kmod.spec +%if 0%{?fedora} +%global buildforkernels akmod +%global debug_package %nil +%endif + +Name: v4l2loopback-kmod +Summary: v4l2-loopback kernel module +Version: 0.13.2 +Release: 1%?dist +License: GPL-2.0-or-later + +URL: https://github.com/umlaeute/v4l2loopback +Source0: %url/archive/v%version/v4l2loopback-%version.tar.gz + +BuildRequires: gcc +BuildRequires: elfutils-libelf-devel +BuildRequires: kmodtool +BuildRequires: mold +# %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%buildforkernels}%!?buildforkernels:current-%_target_cpu} + +# kmodtool does its magic here +%{expand:%(kmodtool --target %_target_cpu --repo terra --kmodname v4l2loopback %{?buildforkernels:--%buildforkernels} %{?kernels:--for-kernels "%?kernels"} 2>/dev/null) } + +%description +This module allows you to create "virtual video devices". Normal (v4l2) +applications will read these devices as if they were ordinary video +devices, but the video will not be read from e.g. a capture card but +instead it is generated by another application. + +This package contains the kmod module for v4l2loopback. + + +%prep +# error out if there was something wrong with kmodtool +%?kmodtool_check + +# print kmodtool output for debugging purposes: +kmodtool --target %_target_cpu --repo rpmfusion --kmodname v4l2loopback %{?buildforkernels:--%buildforkernels} %{?kernels:--for-kernels "%?kernels"} 2>/dev/null + +%autosetup -n v4l2loopback-%version + +for kernel_version in %?kernel_versions ; do + cp -a v4l2loopback-%version _kmod_build_${kernel_version%%___*} +done + + +%build +for kernel_version in %?kernel_versions ; do + mold -run make V=1 %?_smp_mflags -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules +done + + +%install +for kernel_version in %?kernel_versions; do + mkdir -p %{buildroot}%kmodinstdir_prefix/${kernel_version%%___*}/%kmodinstdir_postfix/ + install -Dm755 _kmod_build_${kernel_version%%___*}/v4l2loopback.ko %buildroot%kmodinstdir_prefix/${kernel_version%%___*}/%kmodinstdir_postfix/ + chmod a+x %buildroot%kmodinstdir_prefix/${kernel_version%%___*}/%kmodinstdir_postfix/*.ko +done +%?akmod_install diff --git a/anda/fusion/kmod-v4l2loopback/update.rhai b/anda/fusion/kmod-v4l2loopback/update.rhai new file mode 100644 index 0000000000..fd9dec4b15 --- /dev/null +++ b/anda/fusion/kmod-v4l2loopback/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("umlaeute/v4l2loopback"));