From 6fe7d41764495cb6dabefdcb7931cd2e282517ec Mon Sep 17 00:00:00 2001 From: Almamu Date: Sat, 11 May 2024 20:14:22 +0200 Subject: [PATCH] feat: add arch pkgbuild update automatically based off commit --- .github/workflows/arch.yml | 23 ++++++++++++++++++++++ packaging/archlinux/PKGBUILD | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/arch.yml create mode 100644 packaging/archlinux/PKGBUILD diff --git a/.github/workflows/arch.yml b/.github/workflows/arch.yml new file mode 100644 index 0000000..ce01a18 --- /dev/null +++ b/.github/workflows/arch.yml @@ -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/github-actions-deploy-aur@v2.7.1 + 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' \ No newline at end of file diff --git a/packaging/archlinux/PKGBUILD b/packaging/archlinux/PKGBUILD new file mode 100644 index 0000000..9637c37 --- /dev/null +++ b/packaging/archlinux/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Alexis Maiquez +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 +}