Skip to content

Commit

Permalink
feat: add arch pkgbuild update automatically based off commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Almamu committed May 11, 2024
1 parent 65f5c46 commit 6fe7d41
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/arch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Arch Linux AUR Package Update

on:
push:
branches: ["main"]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Publish parallel-disk-usage to the AUR
uses: KSXGitHub/[email protected]
with:
pkgname: linux-wallpaperengine-git
pkgbuild: ./packaging/archlinux/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
force_push: 'true'
37 changes: 37 additions & 0 deletions packaging/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Maintainer: Alexis Maiquez <[email protected]>
pkgname=linux-wallpaperengine-git
_pkgname=linux-wallpaperengine
pkgver=r450.7ae8810
pkgrel=1
pkgdesc="use steam's wallpaperengine on linux"
arch=('x86_64')
url="https://github.com/Almamu/linux-wallpaperengine"
license=('GPL3')
depends=('lz4' 'ffmpeg' 'mpv' 'freeimage' 'glfw' 'glew' 'freeglut' 'libpulse')
makedepends=('git' 'cmake' 'sdl2' 'glm')
provides=("linux-wallpaperengine")
source=("${pkgname}::git+https://github.com/Almamu/linux-wallpaperengine.git#branch=main")
sha512sums=('SKIP')
optdepends=(
'xorg-xrandr: support for X11'
'wayland-protocols: support for wayland')

pkgver() {
cd "$pkgname"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}

build() {
cmake -B build -S "$pkgname" \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-Wno-dev
cmake --build build
}

package() {
DESTDIR="$pkgdir" cmake --install build
}

0 comments on commit 6fe7d41

Please sign in to comment.