diff --git a/.github/workflows/ci-archlinux.yml b/.github/workflows/ci-archlinux.yml index d67b33391..96b59ecc8 100644 --- a/.github/workflows/ci-archlinux.yml +++ b/.github/workflows/ci-archlinux.yml @@ -134,8 +134,12 @@ jobs: # Run Xvfb for headless testing Xvfb "${DISPLAY}" -screen 0 1024x768x24 & - # Check PKGBUILD - sudo -u builder namcap -i PKGBUILD + # Fail the build on PKGBUILD warnings and errors. + report=$(sudo -u builder namcap -i PKGBUILD) + printf '%s\n' "$report" + if grep -qE '^PKGBUILD( \([^)]*\))? [EW]:' <<< "$report"; then + exit 1 + fi # Export PKGBUILD options so they're available to makepkg export _use_cuda="${_use_cuda}" diff --git a/packaging/linux/Arch/PKGBUILD b/packaging/linux/Arch/PKGBUILD index 4eaee2773..d70993883 100644 --- a/packaging/linux/Arch/PKGBUILD +++ b/packaging/linux/Arch/PKGBUILD @@ -1,3 +1,6 @@ +# Maintainer: SunshineStream +# Sunshine issues: https://github.com/SunshineStream/Sunshine/issues +# Pacman repository issues: https://github.com/LizardByte/pacman-repo/issues # Edit on github: https://github.com/SunshineStream/Sunshine/blob/master/packaging/linux/Arch/PKGBUILD # Reference: https://wiki.archlinux.org/title/PKGBUILD @@ -95,8 +98,9 @@ if [[ "${_use_cuda::1}" == "d" ]] && pacman -Qi cuda &> /dev/null; then fi if [[ "${_use_cuda::1}" == "t" ]]; then - optdepends+=( + optdepends=( 'cuda: Nvidia GPU encoding support' + "${optdepends[@]}" ) fi @@ -106,19 +110,6 @@ if [[ "${_support_headless_testing::1}" == "t" ]]; then ) fi -# Ensure makedepends, checkdepends, optdepends are sorted -if [ -n "${makedepends+x}" ]; then - mapfile -t tmp_array < <(printf '%s\n' "${makedepends[@]}" | sort) - makedepends=("${tmp_array[@]}") - unset tmp_array -fi - -if [ -n "${optdepends+x}" ]; then - mapfile -t tmp_array < <(printf '%s\n' "${optdepends[@]}" | sort) - optdepends=("${tmp_array[@]}") - unset tmp_array -fi - prepare() { cd "$pkgname" git submodule update --recursive --init --depth 1