-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project pkg { | ||
rpm { | ||
spec = "kmod-v4l2loopback.spec" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rpm.version(gh_tag("umlaeute/v4l2loopback")); |