feat(akmods): add OpenGC570D driver

This commit is contained in:
neoyagami 2026-11-01 19:44:51 -03:00
parent 4c28e8744a
commit 2e150af7c8
2 changed files with 114 additions and 0 deletions

View file

@ -0,0 +1,66 @@
# SPDX-License-Identifier: GPL-2.0-only
%global buildforkernels akmod
%global debug_package %{nil}
%global kmod_name gc570d
%global upstream_name OpenGC570D
Name: %{kmod_name}-kmod
# renovate: datasource=github-releases depName=neoyagami/OpenGC570D
Version: 1.0.5
Release: 1%{?dist}
Summary: Linux kernel module for the AVerMedia Live Gamer DUO GC570D
License: GPL-2.0-only
URL: https://github.com/neoyagami/OpenGC570D
Source0: %{url}/archive/refs/tags/v%{version}/%{upstream_name}-%{version}.tar.gz
ExclusiveArch: x86_64
BuildRequires: kmodtool
%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{kmod_name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
%description
Experimental Linux driver for the AVerMedia Live Gamer DUO GC570D PCIe
capture card (PCI 1461:0054, subsystem 1461:5700).
This package contains the %{kmod_name} kernel module.
%prep
%{?kmodtool_check}
kmodtool --target %{_target_cpu} --kmodname %{kmod_name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
%autosetup -c %{name}-%{version}
for kernel_version in %{?kernel_versions}; do
cp -a %{upstream_name}-%{version} _kmod_build_${kernel_version%%___*}
done
%build
for kernel_version in %{?kernel_versions}; do
make V=1 %{?_smp_mflags} \
GC570D_DEVELOPER_DEBUGFS=0 \
-C ${kernel_version##*___} \
M=${PWD}/_kmod_build_${kernel_version%%___*} \
modules
done
%check
test -f %{upstream_name}-%{version}/Makefile
test -f %{upstream_name}-%{version}/src/gc570d-main.c
test -f %{upstream_name}-%{version}/data/gc570d_no_signal_640x360.inc
%install
for kernel_version in %{?kernel_versions}; do
install -D -m 0755 \
_kmod_build_${kernel_version%%___*}/%{kmod_name}.ko \
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{kmod_name}.ko
done
%{?akmod_install}
%changelog
* Sat Oct 24 2026 neoyagami <neoyagami@gmail.com> - 1.0.5-1
- Add the initial Universal Blue AKMOD package
- Disable the development debugfs interface in distribution builds

48
akmods/gc570d/gc570d.spec Normal file
View file

@ -0,0 +1,48 @@
# SPDX-License-Identifier: GPL-2.0-only
Name: gc570d
# renovate: datasource=github-releases depName=neoyagami/OpenGC570D
Version: 1.0.5
Release: 1%{?dist}
Summary: Integration files for the OpenGC570D capture-card driver
License: GPL-2.0-only
URL: https://github.com/neoyagami/OpenGC570D
Source0: %{url}/archive/refs/tags/v%{version}/OpenGC570D-%{version}.tar.gz
BuildArch: noarch
Provides: %{name}-kmod-common = %{version}-%{release}
Requires: %{name}-kmod >= %{version}
Recommends: wireplumber
%description
Documentation and WirePlumber integration for the experimental OpenGC570D
Linux driver for the AVerMedia Live Gamer DUO GC570D PCIe capture card.
The matching kernel-module RPM is built separately for the exact distribution
kernel from the same released source archive.
%prep
%autosetup -n OpenGC570D-%{version}
%build
# No architecture-independent files need to be built.
%check
test -f config/wireplumber/51-gc570d.conf
grep -F 'AVerMedia Live Gamer DUO' config/wireplumber/51-gc570d.conf
%install
install -D -m 0644 config/wireplumber/51-gc570d.conf \
%{buildroot}%{_datadir}/wireplumber/wireplumber.conf.d/51-gc570d.conf
%files
%license LICENSE
%doc README.md NOTICE.md MAINTAINERS.md SECURITY.md CONTRIBUTING.md
%doc docs/DATA_PROVENANCE.md docs/INSTALL.md docs/LEGAL.md
%doc docs/PACKAGING.md docs/REVERSE_ENGINEERING.md docs/STATUS.md docs/USAGE.md
%{_datadir}/wireplumber/wireplumber.conf.d/51-gc570d.conf
%changelog
* Sat Oct 24 2026 neoyagami <neoyagami@gmail.com> - 1.0.5-1
- Add the initial Universal Blue common package
- Install documentation and the system WirePlumber capture policy