commit dfaa54dcadf47b4b0d8ab27218e081ea4ec18fae
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 23 13:36:26 2021 +0100
Squashed commit of the following:
commit 3170a1314e36bf700f544779e723953b0a11f3fa
Author: Neal Gompa <ngompa13(a)gmail.com>
Date: Sun Dec 27 13:18:51 2020 -0500
v4l2loopback-utils: Drop unsatisfiable requirement
commit c4e552d98d8c1e28b8c4162f2081989503a3a51b
Author: Neal Gompa <ngompa13(a)gmail.com>
Date: Sun Dec 27 12:20:10 2020 -0500
v4l2loopback-utils: Fix the build
commit 37e553a1cf656c3c03a7ad38b6470e66dcc788cb
Author: Neal Gompa <ngompa13(a)gmail.com>
Date: Sat Dec 26 18:42:44 2020 -0500
v4l2loopback-kmod: Initial packaging
commit f68c1a84036d8eeda21871a4d67a7164bc22eda2
Author: Neal Gompa <ngompa13(a)gmail.com>
Date: Sat Dec 26 18:41:57 2020 -0500
v4l2loopback-utils: Initial packaging
commit 4674068219d4ab8e925f62a2f7c6805d45c59731
Author: Neal Gompa <ngompa13(a)gmail.com>
Date: Sat Dec 26 18:41:23 2020 -0500
Initial commit
Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
.gitignore | 2 +
LICENSE | 21 +++++++
README.md | 3 +
...clude-header-outside-of-struct-definition.patch | 38 +++++++++++++
v4l2loopback-kmod.spec | 66 ++++++++++++++++++++++
5 files changed, 130 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0195d2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar.gz
+*.rpm
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..525552c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Neal Gompa
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b91e2e8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Packaging of v4l2loopback
+
+This repository contains the packaging for `v4l2loopback` driver for Fedora.
diff --git a/v4l2loopback-0.12.3-Include-header-outside-of-struct-definition.patch
b/v4l2loopback-0.12.3-Include-header-outside-of-struct-definition.patch
new file mode 100644
index 0000000..564956e
--- /dev/null
+++ b/v4l2loopback-0.12.3-Include-header-outside-of-struct-definition.patch
@@ -0,0 +1,38 @@
+From: Luigi Baldoni <aloisio(a)gmx.com>
+Date: 2020-01-08 15:10:05 +0100
+Subject: Include header outside of struct definition
+References: (boo#1159777)
+
+Make gcc DWARF generator work by moving struct
+definition inside header file.
+
+(many thanks to Mark J. Wielaard)
+
+Index: v4l2loopback-0.12.3/v4l2loopback.c
+===================================================================
+--- v4l2loopback-0.12.3.orig/v4l2loopback.c
++++ v4l2loopback-0.12.3/v4l2loopback.c
+@@ -397,9 +397,7 @@ struct v4l2l_format {
+ #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V',
'C')
+ #endif
+
+-static const struct v4l2l_format formats[] = {
+ #include "v4l2loopback_formats.h"
+-};
+
+ static const unsigned int FORMATS = ARRAY_SIZE(formats);
+
+Index: v4l2loopback-0.12.3/v4l2loopback_formats.h
+===================================================================
+--- v4l2loopback-0.12.3.orig/v4l2loopback_formats.h
++++ v4l2loopback-0.12.3/v4l2loopback_formats.h
+@@ -1,3 +1,4 @@
++static const struct v4l2l_format formats[] = {
+ /* here come the packed formats */
+ {
+ .name = "32 bpp RGB, le",
+@@ -420,3 +421,4 @@
+ .flags = FORMAT_FLAGS_COMPRESSED,
+ },
+ #endif /* V4L2_PIX_FMT_HEVC */
++};
diff --git a/v4l2loopback-kmod.spec b/v4l2loopback-kmod.spec
new file mode 100644
index 0000000..7c6f80e
--- /dev/null
+++ b/v4l2loopback-kmod.spec
@@ -0,0 +1,66 @@
+%if 0%{?fedora}
+%global buildforkernels akmod
+%global debug_package %{nil}
+%endif
+
+%global prjname v4l2loopback
+
+Name: %{prjname}-kmod
+Summary: Kernel module (kmod) for %{prjname}
+Version: 0.12.5
+Release: 1%{?dist}
+License: GPLv2+
+
+URL:
https://github.com/umlaeute/v4l2loopback
+Source0: %{url}/archive/v%{version}/%{prjname}-%{version}.tar.gz
+# Submitted upstream:
https://github.com/umlaeute/v4l2loopback/pull/389
+Patch0: v4l2loopback-0.12.3-Include-header-outside-of-struct-definition.patch
+
+BuildRequires: kmodtool
+%{!?kernels:BuildRequires: gcc, elfutils-libelf-devel,
buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}
}
+
+# kmodtool does its magic here
+%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{prjname}
%{?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 %{prjname}.
+
+
+%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 %{prjname}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null
+
+%autosetup -n %{prjname}-%{version} -p1
+
+for kernel_version in %{?kernel_versions} ; do
+ mkdir -p _kmod_build_${kernel_version%%___*}
+ cp -a . _kmod_build_${kernel_version%%___*}
+done
+
+
+%build
+for kernel_version in %{?kernel_versions} ; do
+ 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 -D -m 755 -t
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ $(find
_kmod_build_${kernel_version%%___*}/ -name '*.ko')
+ chmod u+x %{buildroot}%{_prefix}/lib/modules/*/extra/*/*
+done
+%{?akmod_install}
+
+
+%changelog
+* Sat Dec 26 2020 Neal Gompa <ngompa13(a)gmail.com> - 0.12.5-1
+- Initial packaging