summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0944470916d4a21c6b4eb4a92e66c559ccff5695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: Alexis Maiquez <aur@almamu.com>
pkgname=linux-wallpaperengine-git
_pkgname=linux-wallpaperengine
pkgver=r492.4a063d0
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' '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/${_pkgname}" \
        -Wno-dev
    cmake --build build
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    # create forwarding script
    install -d -m755 "${pkgdir}/usr/bin"
    echo "#!/bin/bash" > ${pkgdir}/usr/bin/${_pkgname}
    echo "cd /opt/${_pkgname}; ./linux-wallpaperengine \$*" >> ${pkgdir}/usr/bin/${_pkgname}
    chmod +x ${pkgdir}/usr/bin/${_pkgname}
    chmod +x ${pkgdir}/opt/${_pkgname}/linux-wallpaperengine
}