mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
feat: Add sc0710 kmod for Elgato capture cards (#11038)
* feat: Add sc0710 kmod * fix: Correct provides in xpadneo-kmod spec file
This commit is contained in:
committed by
GitHub
parent
4563d2031b
commit
8d2c63d87c
@@ -0,0 +1,9 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "sc0710-kmod.spec"
|
||||
}
|
||||
labels {
|
||||
mock = 1
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
%global commit f1f5a722ccbdfc571450d9397e5e1b85da31f9d3
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20260321
|
||||
%global ver 0
|
||||
%define buildforkernels akmod
|
||||
%global debug_package %{nil}
|
||||
%global modulename sc0710
|
||||
|
||||
Name: %{modulename}-kmod
|
||||
Version: %{ver}^%{commitdate}git.%{shortcommit}
|
||||
Release: 1%{?dist}
|
||||
Summary: Elgato 4K60 Pro MK.2 / 4K Pro capture card driver
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/Nakildias/sc0710
|
||||
Source0: https://github.com/Nakildias/sc0710/archive/%{commit}.tar.gz#/sc0710-%{shortcommit}.tar.gz
|
||||
BuildRequires: kmodtool
|
||||
Requires: akmods
|
||||
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
|
||||
Conflicts: dkms-%{modulename}
|
||||
Packager: Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
%description
|
||||
Elgato 4K60 Pro MK.2 / 4K Pro capture card driver.
|
||||
|
||||
%prep
|
||||
%{?kmodtool_check}
|
||||
kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
|
||||
|
||||
%autosetup -p1 -n %{modulename}-%{commit}
|
||||
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir _kmod_build_${kernel_version%%___*}
|
||||
cp -fr lib Makefile _kmod_build_${kernel_version%%___*}
|
||||
done
|
||||
|
||||
%build
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
pushd _kmod_build_${kernel_version%%___*}/
|
||||
%make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules
|
||||
popd
|
||||
done
|
||||
|
||||
%install
|
||||
for kernel_version in %{?kernel_versions}; do
|
||||
mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \
|
||||
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
done
|
||||
%{?akmod_install}
|
||||
|
||||
%changelog
|
||||
* Fri Apr 03 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
- Initial package
|
||||
@@ -0,0 +1,12 @@
|
||||
let c = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
c.pop();
|
||||
rpm.global("commit", c);
|
||||
if rpm.changed() {
|
||||
rpm.release();
|
||||
let d = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
d.pop();
|
||||
rpm.global("commitdate", d);
|
||||
let v = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
v.pop();
|
||||
rpm.global("ver", v);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
project pkg {
|
||||
arches = ["x86_64"]
|
||||
rpm {
|
||||
spec = "dkms-sc0710.spec"
|
||||
}
|
||||
labels {
|
||||
mock = 1
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
PACKAGE_NAME="sc0710"
|
||||
PACKAGE_VERSION="__VERSION_STRING"
|
||||
AUTOINSTALL="yes"
|
||||
|
||||
BUILT_MODULE_NAME[0]="sc0710"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/drivers/media/pci/"
|
||||
@@ -0,0 +1,60 @@
|
||||
%global commit f1f5a722ccbdfc571450d9397e5e1b85da31f9d3
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20260321
|
||||
%global ver 0
|
||||
%global debug_package %{nil}
|
||||
%global modulename sc0710
|
||||
|
||||
Name: dkms-%{modulename}
|
||||
Version: %{ver}^%{commitdate}git.%{shortcommit}
|
||||
Release: 1%{?dist}
|
||||
Summary: Elgato 4K60 Pro MK.2 / 4K Pro capture card driver (DKMS)
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/Nakildias/%{modulename}
|
||||
Source0: https://github.com/Nakildias/%{modulename}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz
|
||||
Source1: %{name}.conf
|
||||
Source2: no-weak-modules.conf
|
||||
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: dkms
|
||||
Conflicts: akmod-%{modulename}
|
||||
Provides: %{modulename}-kmod
|
||||
BuildArch: noarch
|
||||
Packager: Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
|
||||
%description
|
||||
Elgato 4K60 Pro MK.2 / 4K Pro capture card driver (DKMS).
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{modulename}-%{commit}
|
||||
|
||||
cp -f %{SOURCE1} dkms.conf
|
||||
|
||||
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
|
||||
cp -fr lib Makefile dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
|
||||
|
||||
%if 0%{?fedora}
|
||||
install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf
|
||||
%endif
|
||||
|
||||
%post
|
||||
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
|
||||
dkms build -m %{modulename} -v %{version} -q || :
|
||||
dkms install -m %{modulename} -v %{version} -q --force || :
|
||||
|
||||
%preun
|
||||
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
|
||||
|
||||
%files
|
||||
%{_usrsrc}/%{modulename}-%{version}
|
||||
%if 0%{?fedora}
|
||||
%{_sysconfdir}/dkms/%{modulename}.conf
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Apr 03 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
- Initial package
|
||||
@@ -0,0 +1 @@
|
||||
NO_WEAK_MODULES="yes"
|
||||
@@ -0,0 +1,12 @@
|
||||
let c = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
c.pop();
|
||||
rpm.global("commit", c);
|
||||
if rpm.changed() {
|
||||
rpm.release();
|
||||
let d = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
d.pop();
|
||||
rpm.global("commitdate", d);
|
||||
let v = sh("cat anda/system/sc0710/kmod-common/sc0710.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
|
||||
v.pop();
|
||||
rpm.global("ver", v);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
project pkg {
|
||||
arches = ["x86_64"]
|
||||
rpm {
|
||||
spec = "sc0710.spec"
|
||||
}
|
||||
labels {
|
||||
nightly = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
%global commit f1f5a722ccbdfc571450d9397e5e1b85da31f9d3
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20260321
|
||||
%global ver 0
|
||||
|
||||
Name: sc0710
|
||||
Version: %{ver}^%{commitdate}git.%{shortcommit}
|
||||
Release: 1%{?dist}
|
||||
Summary: Elgato 4K60 Pro MK.2 / 4K Pro capture card driver common files
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/Nakildias/%{name}
|
||||
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
|
||||
Requires: %{name}-kmod = %{?epoch:%{epoch}:}%{version}
|
||||
Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
BuildArch: noarch
|
||||
Packager: Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
|
||||
%description
|
||||
Elgato 4K60 Pro MK.2 / 4K Pro capture card driver common files.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{commit}
|
||||
|
||||
%install
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Fri Apr 03 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
|
||||
- Initial package
|
||||
@@ -0,0 +1,5 @@
|
||||
rpm.global("commit", gh_commit("Nakildias/sc0710"));
|
||||
if rpm.changed() {
|
||||
rpm.release();
|
||||
rpm.global("commitdate", date());
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Name: %{modulename}-kmod
|
||||
Version: %{ver}^%{commitdate}git.%{shortcommit}
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Advanced Linux Driver for Xbox One Wireless Gamepad
|
||||
License: GPL-3.0
|
||||
URL: https://atar-axis.github.io/xpadneo
|
||||
@@ -21,6 +21,7 @@ Requires: bluez-tools
|
||||
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
|
||||
Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version}
|
||||
Conflicts: dkms-%{modulename}
|
||||
Provides: %{modulename}-kmod
|
||||
Packager: Gilver E. <roachy@fyralabs.com>
|
||||
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
Reference in New Issue
Block a user