PKGBUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Maintainer: Alexis Maiquez <aur@almamu.com>
  2. pkgname=linux-wallpaperengine-git
  3. _pkgname=linux-wallpaperengine
  4. pkgver=r450.7ae8810
  5. pkgrel=1
  6. pkgdesc="use steam's wallpaperengine on linux"
  7. arch=('x86_64')
  8. url="https://github.com/Almamu/linux-wallpaperengine"
  9. license=('GPL3')
  10. depends=('lz4' 'ffmpeg' 'mpv' 'glfw' 'glew' 'freeglut' 'libpulse')
  11. makedepends=('git' 'cmake' 'sdl2' 'glm')
  12. provides=("linux-wallpaperengine")
  13. source=("${pkgname}::git+https://github.com/Almamu/linux-wallpaperengine.git#branch=main")
  14. sha512sums=('SKIP')
  15. optdepends=(
  16. 'xorg-xrandr: support for X11'
  17. 'wayland-protocols: support for wayland')
  18. pkgver() {
  19. cd "$pkgname"
  20. ( set -o pipefail
  21. git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  22. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  23. )
  24. }
  25. prepare() {
  26. cd "$pkgname"
  27. git submodule update --init --recursive
  28. git -c protocol.file.allow=always submodule update
  29. }
  30. build() {
  31. cmake -B build -S "$pkgname" \
  32. -DCMAKE_BUILD_TYPE='Release' \
  33. -DCMAKE_INSTALL_PREFIX="/opt/${_pkgname}" \
  34. -Wno-dev \
  35. -DCMAKE_CXX_FLAGS="-ffat-lto-objects -Wno-builtin-macro-redefined" \
  36. -DCMAKE_C_FLAGS="-Wno-builtin-macro-redefined"
  37. cmake --build build
  38. }
  39. package() {
  40. DESTDIR="$pkgdir" cmake --install build
  41. # create forwarding script
  42. install -d -m755 "${pkgdir}/usr/bin"
  43. echo "#!/bin/bash" > ${pkgdir}/usr/bin/${_pkgname}
  44. echo "cd /opt/${_pkgname}; ./linux-wallpaperengine \$*" >> ${pkgdir}/usr/bin/${_pkgname}
  45. chmod +x ${pkgdir}/usr/bin/${_pkgname}
  46. chmod +x ${pkgdir}/opt/${_pkgname}/linux-wallpaperengine
  47. }