PKGBUILD 1.7 KB

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