linux-wallpaperengine/packaging/archlinux/PKGBUILD
2024-06-06 21:42:43 +02:00

42 lines
1.3 KiB
Bash

# Maintainer: Alexis Maiquez <aur@almamu.com>
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='/opt/linux-wallpaperengine' \
-Wno-dev
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
# create forwarding script
echo "#!/bin/bash" > /usr/bin/linux-wallpaperengine
echo "cd /opt/linux-wallpaperengine; ./linux-wallpaperengine \$*" >> /usr/bin/linux-wallpaperengine
chmod +x /usr/bin/linux-wallpaperengine
}