PKGBUILD 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Maintainer: Alexis Maiquez <aur@almamu.com>
  2. pkgname=linux-wallpaperengine-git
  3. _pkgname=linux-wallpaperengine
  4. pkgver=r566.3979527
  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' 'libcups' 'at-spi2-core' 'nss' 'libxcomposite' 'libxdamage' 'nspr')
  11. makedepends=('git' 'cmake' 'sdl2' 'glm')
  12. makeopt=('wayland-protocols')
  13. provides=("linux-wallpaperengine")
  14. source=("${pkgname}::git+https://github.com/Almamu/linux-wallpaperengine.git#branch=main")
  15. sha512sums=('SKIP')
  16. optdepends=(
  17. 'xorg-xrandr: support for X11'
  18. 'wayland-protocols: support for wayland')
  19. pkgver() {
  20. cd "$pkgname"
  21. ( set -o pipefail
  22. git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  23. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  24. )
  25. }
  26. prepare() {
  27. cd "$pkgname"
  28. git submodule update --init --recursive
  29. git -c protocol.file.allow=always submodule update
  30. }
  31. build() {
  32. cmake -B build -S "$pkgname" \
  33. -DCMAKE_BUILD_TYPE='Release' \
  34. -DCMAKE_INSTALL_PREFIX="/opt/${_pkgname}" \
  35. -Wno-dev \
  36. -DCMAKE_CXX_FLAGS="-ffat-lto-objects -Wno-builtin-macro-redefined" \
  37. -DCMAKE_C_FLAGS="-Wno-builtin-macro-redefined"
  38. cmake --build build
  39. }
  40. package() {
  41. DESTDIR="$pkgdir" cmake --install build
  42. # create forwarding script
  43. install -d -m755 "${pkgdir}/usr/bin"
  44. cat > "${pkgdir}/usr/bin/${_pkgname}" << EOF
  45. #!/bin/bash
  46. export LD_LIBRARY_PATH="/opt/${_pkgname}/lib:\$LD_LIBRARY_PATH"
  47. cd /opt/${_pkgname}; ./${_pkgname} "\$@"
  48. EOF
  49. chmod +x ${pkgdir}/usr/bin/${_pkgname}
  50. chmod +x ${pkgdir}/opt/${_pkgname}/linux-wallpaperengine
  51. }