mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-14 23:50:38 +00:00
75 lines
2.5 KiB
RPMSpec
75 lines
2.5 KiB
RPMSpec
# 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.12.7
|
|
Release: 1%?dist
|
|
License: GPL-2.0+
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
%changelog
|
|
* Tue May 23 2023 windowsboy111 <windowsboy111@fyralabs.com> - 0.12.7-1
|
|
- Repackaged for Terra
|
|
|
|
* Tue Feb 23 2021 Nicolas Chauvet <kwizart@gmail.com> - 0.12.5-3
|
|
- Bump spec
|
|
|
|
* Mon Feb 15 2021 Nicolas Chauvet <kwizart@gmail.com> - 0.12.5-2
|
|
- Rework spec file
|
|
|
|
* Sat Dec 26 2020 Neal Gompa <ngompa13@gmail.com> - 0.12.5-1
|
|
- Initial packaging
|