├── .gitignore-aur ├── .gitignore ├── beta-repos.conf ├── pkgbuilds └── sunshine │ ├── sunshine.install │ ├── .SRCINFO │ └── PKGBUILD ├── .github ├── semantic.yml ├── workflows │ ├── _common-lint.yml │ ├── _codeql.yml │ ├── sync-aur.yml │ └── build-repo.yml └── dependabot.yml ├── LICENSE └── README.md /.gitignore-aur: -------------------------------------------------------------------------------- 1 | # ignore build artifacts 2 | /*/ 3 | /*.pkg.* 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore JetBrains IDE files 2 | .idea/ 3 | 4 | # ignore build artifacts 5 | /pkgbuilds/*/*/ 6 | /pkgbuilds/*/*.pkg.* 7 | -------------------------------------------------------------------------------- /beta-repos.conf: -------------------------------------------------------------------------------- 1 | # repo_owner/repo_name og_pkg_name updated_pkg_name release_asset_file_name 2 | lizardbyte/sunshine sunshine sunshine-git sunshine.pkg.tar.gz 3 | -------------------------------------------------------------------------------- /pkgbuilds/sunshine/sunshine.install: -------------------------------------------------------------------------------- 1 | do_setcap() { 2 | setcap cap_sys_admin+p $(readlink -f usr/bin/sunshine) 3 | } 4 | 5 | do_udev_reload() { 6 | udevadm control --reload-rules 7 | udevadm trigger --property-match=DEVNAME=/dev/uinput 8 | udevadm trigger --property-match=DEVNAME=/dev/uhid 9 | modprobe uinput || true 10 | modprobe uhid || true 11 | } 12 | 13 | post_install() { 14 | do_setcap 15 | do_udev_reload 16 | modprobe uhid 17 | } 18 | 19 | post_upgrade() { 20 | do_setcap 21 | do_udev_reload 22 | modprobe uhid 23 | } 24 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This file is centrally managed in https://github.com//.github/ 3 | # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in 4 | # the above-mentioned repo. 5 | 6 | # This is the configuration file for https://github.com/Ezard/semantic-prs 7 | 8 | enabled: true 9 | titleOnly: true # We only use the PR title as we squash and merge 10 | commitsOnly: false 11 | titleAndCommits: false 12 | anyCommit: false 13 | allowMergeCommits: false 14 | allowRevertCommits: false 15 | targetUrl: https://docs.lizardbyte.dev/latest/developers/contributing.html#creating-a-pull-request 16 | -------------------------------------------------------------------------------- /.github/workflows/_common-lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This workflow is centrally managed in https://github.com/LizardByte/.github/ 3 | # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in 4 | # the above-mentioned repo. 5 | 6 | name: common lint 7 | permissions: 8 | contents: read 9 | 10 | on: 11 | pull_request: 12 | branches: 13 | - master 14 | types: 15 | - opened 16 | - synchronize 17 | - reopened 18 | 19 | concurrency: 20 | group: "${{ github.workflow }}-${{ github.ref }}" 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | lint: 25 | name: Common Lint 26 | uses: LizardByte/.github/.github/workflows/__call-common-lint.yml@master 27 | if: ${{ github.repository != 'LizardByte/.github' }} 28 | -------------------------------------------------------------------------------- /.github/workflows/_codeql.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This workflow is centrally managed in https://github.com/LizardByte/.github/ 3 | # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in 4 | # the above-mentioned repo. 5 | 6 | name: CodeQL 7 | permissions: 8 | actions: read 9 | contents: read 10 | security-events: write 11 | 12 | on: 13 | push: 14 | branches: 15 | - master 16 | pull_request: 17 | branches: 18 | - master 19 | schedule: 20 | - cron: '00 12 * * 0' # every Sunday at 12:00 UTC 21 | 22 | concurrency: 23 | group: "${{ github.workflow }}-${{ github.ref }}" 24 | cancel-in-progress: true 25 | 26 | jobs: 27 | call-codeql: 28 | name: CodeQL 29 | uses: LizardByte/.github/.github/workflows/__call-codeql.yml@master 30 | if: ${{ github.repository != 'LizardByte/.github' }} 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024-2025 LizardByte 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pkgbuilds/sunshine/.SRCINFO: -------------------------------------------------------------------------------- 1 | pkgbase = sunshine 2 | pkgdesc = Self-hosted game stream host for Moonlight 3 | pkgver = 2025.924.154138 4 | pkgrel = 1 5 | url = https://app.lizardbyte.dev/Sunshine 6 | install = sunshine.install 7 | arch = x86_64 8 | arch = aarch64 9 | license = GPL-3.0-only 10 | makedepends = appstream 11 | makedepends = appstream-glib 12 | makedepends = cmake 13 | makedepends = desktop-file-utils 14 | makedepends = gcc14 15 | makedepends = git 16 | makedepends = make 17 | makedepends = nodejs 18 | makedepends = npm 19 | depends = avahi 20 | depends = curl 21 | depends = libayatana-appindicator 22 | depends = libcap 23 | depends = libdrm 24 | depends = libevdev 25 | depends = libmfx 26 | depends = libnotify 27 | depends = libpulse 28 | depends = libva 29 | depends = libx11 30 | depends = libxcb 31 | depends = libxfixes 32 | depends = libxrandr 33 | depends = libxtst 34 | depends = miniupnpc 35 | depends = numactl 36 | depends = openssl 37 | depends = opus 38 | depends = udev 39 | depends = which 40 | optdepends = cuda: Nvidia GPU encoding support 41 | optdepends = libva-mesa-driver: AMD GPU encoding support 42 | optdepends = xorg-server-xvfb: Virtual X server for headless testing 43 | source = sunshine::git+https://github.com/LizardByte/Sunshine.git#commit=86188d47a7463b0f73b35de18a628353adeaa20e 44 | sha256sums = SKIP 45 | 46 | pkgname = sunshine 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LizardByte's Pacman Repository 2 | 3 | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/LizardByte/pacman-repo/build-repo.yml?branch=master&event=schedule&style=for-the-badge&logo=github)](https://github.com/LizardByte/pacman-repo/actions/workflows/build-repo.yml?query=event%3Aschedule+branch%3Amaster) 4 | [![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/LizardByte/pacman-repo/beta/total?style=for-the-badge&logo=archlinux&label=daily%20downloads%40beta)](https://github.com/LizardByte/pacman-repo/releases/tag/beta) 5 | [![GitHub Downloads (all assets, specific tag)](https://img.shields.io/github/downloads/LizardByte/pacman-repo/latest/total?style=for-the-badge&logo=archlinux&label=daily%20downloads%40latest)](https://github.com/LizardByte/pacman-repo/releases/latest) 6 | 7 | Repository of Arch Linux packages for LizardByte packages. 8 | 9 | > [!CAUTION] 10 | > LizardByte does not support packages hosted on the AUR. The platform is not secure, since anyone is able to 11 | > become the packager of an AUR repo. If you use the AUR, please carefully inspect any PKGBUILDS for packages that you 12 | > are using, before any installation. This repository is the only official source of LizardByte packages. 13 | 14 | ## Repo Installation 15 | 16 | Add the following code snippet to your `/etc/pacman.conf`: 17 | 18 | ```conf 19 | [lizardbyte] 20 | SigLevel = Optional 21 | Server = https://github.com/LizardByte/pacman-repo/releases/latest/download 22 | ``` 23 | 24 | ```conf 25 | [lizardbyte-beta] 26 | SigLevel = Optional 27 | Server = https://github.com/LizardByte/pacman-repo/releases/download/beta 28 | ``` 29 | 30 | Then, run `sudo pacman -Sy` to update repository. 31 | 32 | ## Packages 33 | 34 | ### List repo packages 35 | 36 | ```bash 37 | pacman -Sl lizardbyte 38 | pacman -Sl lizardbyte-beta 39 | ``` 40 | 41 | ### Install repo packages 42 | 43 | ```bash 44 | sudo pacman -S lizardbyte/ 45 | sudo pacman -S lizardbyte-beta/ 46 | ``` 47 | 48 | e.g. 49 | ```bash 50 | sudo pacman -S lizardbyte/sunshine 51 | sudo pacman -S lizardbyte-beta/sunshine-git 52 | ``` 53 | 54 | ## Considerations 55 | 56 | - To account for changes to any dependencies, packages in this repo are rebuilt once per day. 57 | - Packages may have optional run time dependencies, you can review the PKGBUILD files for more information. 58 | 59 | ## License 60 | 61 | This repository is licensed under the [MIT License](LICENSE); however, individual packages may have their own licenses. 62 | Please refer to the `.SRCINFO` or `PKGBUILD` files for more information. 63 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This file is centrally managed in https://github.com//.github/ 3 | # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in 4 | # the above-mentioned repo. 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "cargo" 9 | directory: "/" 10 | rebase-strategy: disabled 11 | schedule: 12 | interval: "cron" 13 | cronjob: "0 1 * * *" 14 | timezone: "America/New_York" 15 | open-pull-requests-limit: 10 16 | 17 | - package-ecosystem: "docker" 18 | directory: "/" 19 | rebase-strategy: disabled 20 | schedule: 21 | interval: "cron" 22 | cronjob: "30 1 * * *" 23 | timezone: "America/New_York" 24 | open-pull-requests-limit: 10 25 | 26 | - package-ecosystem: "github-actions" 27 | directories: 28 | - "/" 29 | - "/.github/actions/*" 30 | - "/actions/*" 31 | rebase-strategy: disabled 32 | schedule: 33 | interval: "cron" 34 | cronjob: "0 2 * * *" 35 | timezone: "America/New_York" 36 | open-pull-requests-limit: 10 37 | groups: 38 | docker-actions: 39 | applies-to: version-updates 40 | patterns: 41 | - "docker/*" 42 | github-actions: 43 | applies-to: version-updates 44 | patterns: 45 | - "actions/*" 46 | - "github/*" 47 | lizardbyte-actions: 48 | applies-to: version-updates 49 | patterns: 50 | - "LizardByte/*" 51 | 52 | - package-ecosystem: "gitsubmodule" 53 | directory: "/" 54 | rebase-strategy: disabled 55 | schedule: 56 | interval: "cron" 57 | cronjob: "30 2 * * *" 58 | timezone: "America/New_York" 59 | open-pull-requests-limit: 10 60 | 61 | - package-ecosystem: "npm" 62 | directory: "/" 63 | rebase-strategy: disabled 64 | schedule: 65 | interval: "cron" 66 | cronjob: "0 3 * * *" 67 | timezone: "America/New_York" 68 | open-pull-requests-limit: 10 69 | groups: 70 | dev-dependencies: 71 | applies-to: version-updates 72 | dependency-type: "development" 73 | 74 | - package-ecosystem: "nuget" 75 | directory: "/" 76 | rebase-strategy: disabled 77 | schedule: 78 | interval: "cron" 79 | cronjob: "30 3 * * *" 80 | timezone: "America/New_York" 81 | open-pull-requests-limit: 10 82 | 83 | - package-ecosystem: "pip" 84 | directory: "/" 85 | rebase-strategy: disabled 86 | schedule: 87 | interval: "cron" 88 | cronjob: "0 4 * * *" 89 | timezone: "America/New_York" 90 | open-pull-requests-limit: 10 91 | groups: 92 | pytest-dependencies: 93 | applies-to: version-updates 94 | patterns: 95 | - "pytest*" 96 | 97 | - package-ecosystem: "rust-toolchain" 98 | directory: "/" 99 | rebase-strategy: disabled 100 | schedule: 101 | interval: "cron" 102 | cronjob: "30 4 * * *" 103 | timezone: "America/New_York" 104 | open-pull-requests-limit: 1 105 | -------------------------------------------------------------------------------- /pkgbuilds/sunshine/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Edit on github: https://github.com/LizardByte/Sunshine/blob/master/packaging/linux/Arch/PKGBUILD 2 | # Reference: https://wiki.archlinux.org/title/PKGBUILD 3 | 4 | ## options 5 | : "${_run_unit_tests:=false}" # if set to true; unit tests will be executed post build; useful in CI 6 | : "${_support_headless_testing:=false}" 7 | : "${_use_cuda:=detect}" # nvenc 8 | 9 | : "${_commit:=86188d47a7463b0f73b35de18a628353adeaa20e}" 10 | 11 | pkgname='sunshine' 12 | pkgver=2025.924.154138 13 | pkgrel=1 14 | pkgdesc="Self-hosted game stream host for Moonlight" 15 | arch=('x86_64' 'aarch64') 16 | url=https://app.lizardbyte.dev/Sunshine 17 | license=('GPL-3.0-only') 18 | install=sunshine.install 19 | 20 | _gcc_version=14 21 | 22 | depends=( 23 | 'avahi' 24 | 'curl' 25 | 'libayatana-appindicator' 26 | 'libcap' 27 | 'libdrm' 28 | 'libevdev' 29 | 'libmfx' 30 | 'libnotify' 31 | 'libpulse' 32 | 'libva' 33 | 'libx11' 34 | 'libxcb' 35 | 'libxfixes' 36 | 'libxrandr' 37 | 'libxtst' 38 | 'miniupnpc' 39 | 'numactl' 40 | 'openssl' 41 | 'opus' 42 | 'udev' 43 | 'which' 44 | ) 45 | 46 | makedepends=( 47 | 'appstream' 48 | 'appstream-glib' 49 | 'cmake' 50 | 'desktop-file-utils' 51 | "gcc${_gcc_version}" 52 | 'git' 53 | 'make' 54 | 'nodejs' 55 | 'npm' 56 | ) 57 | 58 | optdepends=( 59 | 'libva-mesa-driver: AMD GPU encoding support' 60 | ) 61 | 62 | provides=() 63 | conflicts=() 64 | 65 | source=("$pkgname::git+https://github.com/LizardByte/Sunshine.git#commit=${_commit}") 66 | sha256sums=('SKIP') 67 | 68 | # Options Handling 69 | if [[ "${_use_cuda::1}" == "d" ]] && pacman -Qi cuda &> /dev/null; then 70 | _use_cuda=true 71 | fi 72 | 73 | if [[ "${_use_cuda::1}" == "t" ]]; then 74 | optdepends+=( 75 | 'cuda: Nvidia GPU encoding support' 76 | ) 77 | fi 78 | 79 | if [[ "${_support_headless_testing::1}" == "t" ]]; then 80 | optdepends+=( 81 | 'xorg-server-xvfb: Virtual X server for headless testing' 82 | ) 83 | fi 84 | 85 | # Ensure makedepends, checkdepends, optdepends are sorted 86 | if [ -n "${makedepends+x}" ]; then 87 | mapfile -t tmp_array < <(printf '%s\n' "${makedepends[@]}" | sort) 88 | makedepends=("${tmp_array[@]}") 89 | unset tmp_array 90 | fi 91 | 92 | if [ -n "${optdepends+x}" ]; then 93 | mapfile -t tmp_array < <(printf '%s\n' "${optdepends[@]}" | sort) 94 | optdepends=("${tmp_array[@]}") 95 | unset tmp_array 96 | fi 97 | 98 | prepare() { 99 | cd "$pkgname" 100 | git submodule update --recursive --init 101 | } 102 | 103 | build() { 104 | export BRANCH="master" 105 | export BUILD_VERSION="2025.924.154138" 106 | export COMMIT="${_commit}" 107 | 108 | export CC="gcc-${_gcc_version}" 109 | export CXX="g++-${_gcc_version}" 110 | 111 | export CFLAGS="${CFLAGS/-Werror=format-security/}" 112 | export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}" 113 | 114 | export MAKEFLAGS="${MAKEFLAGS:--j$(nproc)}" 115 | 116 | local _cmake_options=( 117 | -S "$pkgname" 118 | -B build 119 | -Wno-dev 120 | -D BUILD_DOCS=OFF 121 | -D BUILD_WERROR=ON 122 | -D CMAKE_INSTALL_PREFIX=/usr 123 | -D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine 124 | -D SUNSHINE_ASSETS_DIR="share/sunshine" 125 | -D SUNSHINE_PUBLISHER_NAME='LizardByte' 126 | -D SUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev' 127 | -D SUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support' 128 | ) 129 | 130 | if [[ "${_use_cuda::1}" != "t" ]]; then 131 | _cmake_options+=(-DSUNSHINE_ENABLE_CUDA=OFF -DCUDA_FAIL_ON_MISSING=OFF) 132 | else 133 | # If cuda has just been installed, its variables will not be available in the environment 134 | # therefore, set them manually to the expected values on Arch Linux 135 | if [ -z "${CUDA_PATH:-}" ] && pacman -Qi cuda &> /dev/null; then 136 | local _cuda_gcc_version 137 | _cuda_gcc_version="$(LC_ALL=C pacman -Si cuda | grep -Pom1 '^Depends On\s*:.*\bgcc\K[0-9]+\b')" 138 | 139 | export CUDA_PATH=/opt/cuda 140 | export NVCC_CCBIN="/usr/bin/g++-${_cuda_gcc_version}" 141 | fi 142 | fi 143 | 144 | if [[ "${_run_unit_tests::1}" != "t" ]]; then 145 | _cmake_options+=(-DBUILD_TESTS=OFF) 146 | fi 147 | 148 | cmake "${_cmake_options[@]}" 149 | 150 | appstreamcli validate "build/dev.lizardbyte.app.Sunshine.metainfo.xml" 151 | appstream-util validate "build/dev.lizardbyte.app.Sunshine.metainfo.xml" 152 | desktop-file-validate "build/dev.lizardbyte.app.Sunshine.desktop" 153 | desktop-file-validate "build/dev.lizardbyte.app.Sunshine.terminal.desktop" 154 | 155 | make -C build 156 | } 157 | 158 | check() { 159 | cd "${srcdir}/build" 160 | ./sunshine --version 161 | 162 | if [[ "${_run_unit_tests::1}" == "t" ]]; then 163 | export CC="gcc-${_gcc_version}" 164 | export CXX="g++-${_gcc_version}" 165 | 166 | cd "${srcdir}/build/tests" 167 | ./test_sunshine --gtest_color=yes 168 | fi 169 | } 170 | 171 | package() { 172 | export MAKEFLAGS="${MAKEFLAGS:--j$(nproc)}" 173 | make -C build install DESTDIR="$pkgdir" 174 | } 175 | -------------------------------------------------------------------------------- /.github/workflows/sync-aur.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Sync AUR Packages 3 | 4 | permissions: 5 | contents: read 6 | 7 | concurrency: 8 | group: ${{ github.workflow }}-${{ github.ref }} 9 | cancel-in-progress: true 10 | 11 | on: 12 | workflow_dispatch: 13 | push: 14 | branches: 15 | - master 16 | paths: 17 | - 'pkgbuilds/**' 18 | 19 | jobs: 20 | get-matrix: 21 | runs-on: ubuntu-latest 22 | outputs: 23 | matrix: ${{ steps.set-matrix.outputs.matrix }} 24 | steps: 25 | - name: Checkout repository 26 | uses: actions/checkout@v6 27 | 28 | - name: Generate matrix 29 | id: set-matrix 30 | run: | 31 | # Get all subdirectories in pkgbuilds 32 | packages=$(find pkgbuilds -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort) 33 | matrix_json=$(echo "$packages" | jq -R -s -c 'split("\n")[:-1] | map(select(length > 0))') 34 | echo "matrix={\"package\": $matrix_json}" >> "${GITHUB_OUTPUT}" 35 | echo "Generated matrix: {\"package\": $matrix_json}" 36 | 37 | sync: 38 | needs: 39 | - get-matrix 40 | runs-on: ubuntu-latest 41 | strategy: 42 | matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }} 43 | fail-fast: false 44 | env: 45 | PACKAGE: ${{ matrix.package }} 46 | steps: 47 | - name: Checkout repository 48 | uses: actions/checkout@v6 49 | 50 | - name: Setup SSH for AUR 51 | env: 52 | AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }} 53 | run: | 54 | # Create SSH directory 55 | mkdir -p ~/.ssh 56 | chmod 700 ~/.ssh 57 | 58 | # Write SSH private key ensuring proper line endings 59 | echo "$AUR_SSH_PRIVATE_KEY" > ~/.ssh/aur 60 | chmod 600 ~/.ssh/aur 61 | 62 | # Verify key format and get key info 63 | echo "Validating SSH key format..." 64 | if ssh-keygen -l -f ~/.ssh/aur 2>/dev/null; then 65 | echo "✓ SSH key validation successful" 66 | echo "Key type and fingerprint shown above" 67 | else 68 | echo "✗ SSH private key format is invalid" 69 | exit 1 70 | fi 71 | 72 | # Add AUR host key 73 | ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null 74 | chmod 644 ~/.ssh/known_hosts 75 | 76 | # Configure SSH to use the AUR key 77 | cat > ~/.ssh/config << EOF 78 | Host aur.archlinux.org 79 | HostName aur.archlinux.org 80 | User aur 81 | IdentityFile ~/.ssh/aur 82 | IdentitiesOnly yes 83 | StrictHostKeyChecking yes 84 | LogLevel ERROR 85 | EOF 86 | chmod 600 ~/.ssh/config 87 | 88 | - name: Configure Git 89 | env: 90 | GIT_USER_NAME: ${{ secrets.GH_BOT_NAME }} 91 | GIT_USER_EMAIL: ${{ secrets.GH_BOT_EMAIL }} 92 | run: | 93 | git config --global user.name "${GIT_USER_NAME}" 94 | git config --global user.email "${GIT_USER_EMAIL}" 95 | 96 | - name: Validate package directory 97 | run: | 98 | echo "Validating package: ${PACKAGE}" 99 | if [ ! -d "pkgbuilds/${PACKAGE}" ]; then 100 | echo "Error: Package directory pkgbuilds/${PACKAGE} does not exist" 101 | exit 1 102 | fi 103 | echo "Package directory found: pkgbuilds/${PACKAGE}" 104 | 105 | - name: Clone AUR repository 106 | run: | 107 | echo "Cloning AUR repository for ${PACKAGE}..." 108 | git clone "ssh://aur@aur.archlinux.org/${PACKAGE}.git" "aur-${PACKAGE}" 109 | echo "Successfully cloned AUR repository" 110 | 111 | - name: Clean AUR repository 112 | working-directory: aur-${{ matrix.package }} 113 | run: | 114 | echo "Cleaning AUR repository..." 115 | find . -maxdepth 1 -not -name '.git' -not -name '.' -not -name '..' -delete 116 | echo "AUR repository cleaned" 117 | 118 | - name: Copy package files 119 | working-directory: aur-${{ matrix.package }} 120 | run: | 121 | echo "Copying files from pacman-repo..." 122 | cp -r "../pkgbuilds/${PACKAGE}/." . # Copy all files including hidden ones (like .SRCINFO) 123 | 124 | # copy .gitignore-aur from workspace root 125 | cd "${GITHUB_WORKSPACE}" 126 | cp .gitignore-aur "aur-${PACKAGE}/.gitignore" 127 | 128 | echo "Files copied successfully" 129 | 130 | - name: Check for changes 131 | id: changes 132 | working-directory: aur-${{ matrix.package }} 133 | run: | 134 | # Check if there are any changes 135 | if [ -z "$(git status --porcelain)" ]; then 136 | echo "No changes detected for ${PACKAGE}" 137 | echo "has_changes=false" >> "${GITHUB_OUTPUT}" 138 | else 139 | echo "Changes detected:" 140 | git status --porcelain 141 | echo "has_changes=true" >> "${GITHUB_OUTPUT}" 142 | echo "Displaying git diff:" 143 | git diff 144 | fi 145 | 146 | - name: Commit and push changes 147 | if: steps.changes.outputs.has_changes == 'true' 148 | working-directory: aur-${{ matrix.package }} 149 | run: | 150 | # Add all files 151 | git add . 152 | 153 | # Commit changes 154 | git commit -m "Update package from LizardByte/pacman-repo 155 | 156 | Automated sync from: https://github.com/LizardByte/pacman-repo/tree/master/pkgbuilds/${PACKAGE} 157 | Commit: ${{ github.sha }}" 158 | 159 | # Push to AUR 160 | echo "Pushing to AUR..." 161 | git push origin master 162 | 163 | echo "Successfully synced ${PACKAGE} to AUR" 164 | 165 | - name: Report sync status 166 | run: | 167 | if [ "${{ steps.changes.outputs.has_changes }}" = "true" ]; then 168 | echo "✅ ${PACKAGE} successfully synced to AUR" >> "${GITHUB_STEP_SUMMARY}" 169 | else 170 | echo "ℹ️ ${PACKAGE} was already up to date" >> "${GITHUB_STEP_SUMMARY}" 171 | fi 172 | -------------------------------------------------------------------------------- /.github/workflows/build-repo.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build Pacman Repo 3 | permissions: 4 | contents: read 5 | 6 | on: 7 | push: 8 | branches: 9 | - master 10 | pull_request: 11 | branches: 12 | - master 13 | schedule: 14 | - cron: "0 0 * * *" 15 | 16 | concurrency: 17 | group: "${{ github.workflow }}-${{ github.ref }}" 18 | cancel-in-progress: true 19 | 20 | jobs: 21 | build-pacman-repo: 22 | runs-on: ubuntu-latest 23 | container: 24 | image: archlinux/archlinux:base-devel 25 | env: 26 | DISPLAY: ":1" 27 | CONTAINER_DIR: pkgbuilds 28 | _use_cuda: "true" 29 | _run_unit_tests: "true" 30 | _support_headless_testing: "true" 31 | strategy: 32 | fail-fast: false 33 | matrix: 34 | include: 35 | - repo: lizardbyte 36 | release_name: stable 37 | - repo: lizardbyte-beta 38 | release_name: beta 39 | steps: 40 | - name: Container Setup 41 | run: | 42 | pacman -Syy --disable-download-timeout --needed --noconfirm \ 43 | archlinux-keyring 44 | pacman -Syu --disable-download-timeout --needed --noconfirm \ 45 | base-devel \ 46 | cmake \ 47 | cuda \ 48 | git \ 49 | jq \ 50 | wget \ 51 | xorg-server-xvfb 52 | pacman -Scc --noconfirm 53 | 54 | - name: Download Pacman Repo Builder 55 | run: | 56 | wget \ 57 | "https://github.com/LizardByte/pacman-repo-builder/releases/latest/download/build-pacman-repo" \ 58 | -O /usr/bin/build-pacman-repo 59 | chmod +x /usr/bin/build-pacman-repo 60 | 61 | # patch makepkg to allow running as root 62 | build-pacman-repo patch-makepkg --replace 63 | 64 | - name: Checkout 65 | uses: actions/checkout@v6 66 | 67 | - name: Configure Git directory 68 | # prevent fatal error when building stable matrix 69 | if: matrix.release_name == 'stable' 70 | run: git config --global --add safe.directory /__w/pacman-repo/pacman-repo 71 | 72 | - name: Download and Patch beta PKGBUILDs 73 | if: matrix.release_name == 'beta' 74 | run: | 75 | # we don't want any stable packages to be built, so remove them 76 | rm -rf "${CONTAINER_DIR}" 77 | mkdir -p "${CONTAINER_DIR}" 78 | cd "${CONTAINER_DIR}" 79 | 80 | while IFS=' ' read -r repo og_pkg_name updated_pkg_name release_asset; do 81 | # Skip lines that start with # 82 | [[ $repo =~ ^#.*$ ]] && continue 83 | 84 | echo "repo: ${repo}" 85 | echo "og_pkg_name: ${og_pkg_name}" 86 | echo "updated_pkg_name: ${updated_pkg_name}" 87 | echo "release_asset: ${release_asset}" 88 | 89 | # get the first release with the specified asset (pre-releases first, followed by stable) 90 | latest_release=$( 91 | curl -s "https://api.github.com/repos/${repo}/releases" | \ 92 | jq -r --arg release_asset "${release_asset}" ' 93 | map(.assets[] | select(.name == $release_asset) | .browser_download_url) | 94 | first 95 | ' 96 | ) 97 | echo "latest_release: ${latest_release}" 98 | if [[ -z "${latest_release}" ]]; then 99 | echo "::warning:: No pre-release found for ${repo} with asset ${release_asset}" 100 | continue 101 | fi 102 | 103 | mkdir -p "${updated_pkg_name}" 104 | pushd "${updated_pkg_name}" 105 | 106 | wget "${latest_release}" -O "${updated_pkg_name}.pkg.tar.gz" 107 | 108 | # extract the package 109 | tar -xvf "${updated_pkg_name}.pkg.tar.gz" 110 | rm "${updated_pkg_name}.pkg.tar.gz" 111 | 112 | # sed PKGBUILD 113 | sed -i "s/pkgname='${og_pkg_name}'/pkgname='${updated_pkg_name}'/" PKGBUILD 114 | sed -i "s/provides=(.*)/provides=('${og_pkg_name}')/" PKGBUILD 115 | sed -i "s/conflicts=(.*)/conflicts=('${og_pkg_name}')/" PKGBUILD 116 | 117 | # Check if provides is missing and append if necessary 118 | if ! grep -q "^provides=" PKGBUILD; then 119 | echo "provides=('${og_pkg_name}')" >> PKGBUILD 120 | fi 121 | 122 | # Check if conflicts is missing and append if necessary 123 | if ! grep -q "^conflicts=" PKGBUILD; then 124 | echo "conflicts=('${og_pkg_name}')" >> PKGBUILD 125 | fi 126 | 127 | echo "new PKGBUILD:" 128 | cat PKGBUILD 129 | 130 | # re-generate .SRCINFO 131 | makepkg --printsrcinfo > .SRCINFO 132 | 133 | # list files 134 | echo "files in ${updated_pkg_name}:" 135 | ls -a 136 | 137 | popd 138 | done < ../beta-repos.conf 139 | 140 | - name: Init 141 | run: | 142 | # create the destination directory for built packages 143 | mkdir -p repo 144 | 145 | # patch the build flags 146 | # shellcheck disable=SC2016 # we don't want to expand the expression here 147 | sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf 148 | 149 | # start Xvfb which may be used for unit tests 150 | Xvfb "${DISPLAY}" -screen 0 1024x768x24 & 151 | 152 | - name: Build Pacman Repo 153 | run: | 154 | source /etc/profile # ensure cuda is in the PATH 155 | 156 | # generate build-pacman-repo.yaml 157 | build-pacman-repo print-config \ 158 | --repository repo/${{ matrix.repo }}.db.tar.gz \ 159 | --container "${CONTAINER_DIR}" \ 160 | --require-pkgbuild \ 161 | --require-srcinfo \ 162 | --with-record-failed-builds repo/failed-build-records.yaml \ 163 | --with-install-missing-dependencies true \ 164 | --with-clean-before-build false \ 165 | --with-clean-after-build false \ 166 | --with-force-rebuild true \ 167 | --with-pacman pacman \ 168 | --with-arch-filter x86_64 \ 169 | --with-check inherit \ 170 | --with-packager "${{ secrets.GH_BOT_NAME }} <${{ secrets.GH_BOT_EMAIL }}>" \ 171 | --with-allow-failure false \ 172 | --with-dereference-database-symlinks true \ 173 | > build-pacman-repo.yaml 174 | 175 | # validate .SRCINFO files 176 | build-pacman-repo sync-srcinfo || \ 177 | echo "::warning:: .SRCINFO files mismatch" >> "${GITHUB_STEP_SUMMARY}" && \ 178 | build-pacman-repo sync-srcinfo -u 179 | 180 | # build the packages and create the repo 181 | build-pacman-repo build 182 | 183 | # ensure files are present in the repo 184 | repo_files=$(ls repo) 185 | if [[ -z "${repo_files}" ]]; then 186 | echo "::error:: No files found in repo" 187 | exit 1 188 | fi 189 | 190 | - name: Create/Update GitHub Release 191 | if: github.event_name == 'schedule' || github.event_name == 'push' 192 | uses: ncipollo/release-action@v1.20.0 193 | with: 194 | allowUpdates: true 195 | artifactErrorsFailBuild: true 196 | artifacts: repo/* 197 | bodyFile: README.md 198 | commit: master 199 | makeLatest: ${{ matrix.release_name == 'stable' || false }} 200 | name: ${{ matrix.release_name }} 201 | prerelease: ${{ matrix.release_name == 'beta' || false }} 202 | tag: ${{ matrix.release_name }} 203 | token: ${{ secrets.GH_BOT_TOKEN }} 204 | --------------------------------------------------------------------------------