-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
1 parent
d22f127
commit 46cbc46
Showing
2 changed files
with
84 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,6 @@ | ||
project "pkg" { | ||
rpm { | ||
spec = "nvidia-patch.spec" | ||
nightly = "1" | ||
} | ||
} |
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,78 @@ | ||
# todo: set up rhai update script | ||
%global debug_package %{nil} | ||
%global commit e875f95560faeefc9ab1dc2eb9d8ac48817d5294 | ||
%global shortcommit %(c=%{commit}; echo ${c:0:7}) | ||
%global commit_date %(date '+%Y%m%d') | ||
|
||
|
||
%global patches %{_datadir}/src/nvidia-patch | ||
Name: nvidia-patch | ||
Version: 0%{commit_date}.git%{shortcommit} | ||
Release: 1%{?dist} | ||
Summary: NVENC and NvFBC patches for NVIDIA drivers | ||
|
||
License: EULA | ||
URL: https://github.com/keylase/nvidia-patch | ||
Source0: %{url}/archive/%{commit}.tar.gz | ||
|
||
BuildRequires: tar | ||
Requires: akmod-nvidia | ||
|
||
%description | ||
NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs. | ||
|
||
NvFBC patch allows to use NvFBC on consumer-grade GPUs. It should be applied same way as NVENC patch.sh, except you have to use patch-fbc.sh instead | ||
|
||
%prep | ||
%autosetup -n nvidia-patch-%{commit} | ||
|
||
rm -rf win/ | ||
%build | ||
|
||
%install | ||
# install current folder to /usr/share/src/nvidia-patch | ||
mkdir -p %{buildroot}%{patches} | ||
cp -va * %{buildroot}/usr/share/src/nvidia-patch | ||
|
||
|
||
|
||
%post | ||
cd /usr/share/src/nvidia-patch | ||
./patch.sh || : | ||
./patch.sh -f || : | ||
./patch-fbc.sh || : | ||
./patch-fbc.sh -f || : | ||
|
||
%preun | ||
cd /usr/share/src/nvidia-patch | ||
./patch.sh -r || : | ||
./patch.sh -f -r || : | ||
./patch-fbc.sh -r || : | ||
./patch-fbc.sh -f -r || : | ||
|
||
# on update | ||
%posttrans | ||
if [ $1 -gt 1 ]; then | ||
cd /usr/share/src/nvidia-patch | ||
./patch.sh || : | ||
./patch.sh -f || : | ||
./patch-fbc.sh || : | ||
./patch-fbc.sh -f || : | ||
fi | ||
# trigger for when akmod-nvidia gets installed | ||
%triggerin -- akmod-nvidia | ||
cd /usr/share/src/nvidia-patch | ||
./patch.sh || : | ||
./patch.sh -f || : | ||
./patch-fbc.sh || : | ||
./patch-fbc.sh -f || : | ||
|
||
%files | ||
%doc README.md | ||
%dir %{_datadir}/src/nvidia-patch | ||
%{_datadir}/src/nvidia-patch/* | ||
|
||
|
||
%changelog | ||
* Mon Nov 06 2023 Cappy Ishihara <[email protected]> | ||
- Initial package |