Add script to build the entire package tree

This commit is contained in:
Lily Tsuru 2024-12-06 03:59:05 -05:00
parent 2176cb6762
commit 08bbd6e0bc
3 changed files with 39 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/output
**/pkg
**/src
pkgs/

View file

@ -14,6 +14,8 @@ The nvidia vgpu_unlock patched and merged driver are in `packages/nvidia-merged`
To disable them, use `_use_new_patches="false" makepkg`. This is useful if you're not using a upstream kernel, since the later patches break building on older kernels.
You can also use `./build_tree.sh` to build everything.
# Thanks
- Erin-allison originally created the PKGBUILD I based this package tree on.

36
build_tree.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
# Helper script to build the entire nvidia-merged package tree
TOP=$PWD
[[ ! -d 'output/' ]] && {
mkdir $TOP/output
mkdir $TOP/output/linux-6.1x/
mkdir $TOP/output/linux-6.8.x/
};
# wipes the package dir clean
wipe_package_dir() {
rm -rf pkg/ src/ *.pkg.tar.zst
}
pushd $TOP/packages/vgpu-unlock-rs/
makepkg -s || (echo "failed to makepkg" && exit 1);
mv *.pkg.tar.zst $TOP/output
wipe_package_dir
popd
pushd $TOP/packages/nvidia-merged/
# first build for legacy
_use_new_patches="false" makepkg -s || (echo "failed to makepkg" && exit 1);
mv *.pkg.tar.zst $TOP/output/linux-6.8.x/
wipe_package_dir
# then for modern
makepkg -s || (echo "failed to makepkg" && exit 1);
mv *.pkg.tar.zst $TOP/output/linux-6.1x/
wipe_package_dir
popd