PKGBUILD 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Maintainer: WallpaperEngineLover <260361707+WallpaperEngineLover@users.noreply.github.com>
  2. pkgname=linux-wallpaperengine-kde-git
  3. _pkgname=linux-wallpaperengine-kde
  4. pkgver=r0
  5. pkgrel=1
  6. pkgdesc="Wallpaper Engine live wallpapers on Linux, fork of linux-wallpaperengine (started with KDE, now supports most desktops, built from git)"
  7. arch=('x86_64')
  8. url="https://github.com/WallpaperEngineLover/linux-wallpaperengine-kde"
  9. license=('GPL-3.0-only')
  10. # libnode (V8 for scene scripts) is in the AUR
  11. depends=('libnode' 'mpv' 'ffmpeg' 'glew' 'glfw' 'sdl2' 'freeglut' 'glu' 'fftw' 'lz4' 'freetype2' 'harfbuzz' 'gmp'
  12. 'dbus' 'wayland' 'libpulse' 'libglvnd' 'libx11' 'libxext' 'libxrandr' 'libxinerama' 'libxcursor' 'libxi' 'libxxf86vm'
  13. 'nss' 'at-spi2-core' 'libcups' 'libxcomposite' 'libxdamage' 'libxkbcommon' 'pango' 'cairo' 'alsa-lib' 'libdrm'
  14. 'mesa' 'libxshmfence')
  15. makedepends=('git' 'cmake' 'glm' 'wayland-protocols' 'python')
  16. provides=('linux-wallpaperengine')
  17. conflicts=('linux-wallpaperengine' 'linux-wallpaperengine-git' 'linux-wallpaperengine-kde-bin')
  18. # CEF ships its own stripped libraries, stripping them again only costs time
  19. options=('!strip' '!debug' '!lto')
  20. source=("$_pkgname::git+$url.git")
  21. sha256sums=('SKIP')
  22. pkgver() {
  23. cd "$_pkgname"
  24. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  25. }
  26. prepare() {
  27. cd "$_pkgname"
  28. git submodule update --init --recursive
  29. }
  30. build() {
  31. # CEF's wrapper library defines its own _FORTIFY_SOURCE and builds with -Werror
  32. CFLAGS="${CFLAGS//-Wp,-D_FORTIFY_SOURCE=?/}"
  33. CXXFLAGS="${CXXFLAGS//-Wp,-D_FORTIFY_SOURCE=?/}"
  34. export CFLAGS CXXFLAGS
  35. # CMake downloads the CEF version the checkout pins
  36. cmake -B build -S "$_pkgname" \
  37. -DCMAKE_BUILD_TYPE=Release \
  38. -DCMAKE_INSTALL_PREFIX="/opt/$_pkgname" \
  39. -Wno-dev
  40. cmake --build build
  41. }
  42. package() {
  43. # the same files as the release tarballs
  44. "$_pkgname/tools/package_release.sh" build "$_pkgname" "$srcdir/dist"
  45. install -d "$pkgdir/opt"
  46. tar -xzf "$srcdir/dist/$_pkgname.tar.gz" -C "$pkgdir/opt"
  47. # without user namespaces Chromium falls back to the setuid sandbox
  48. chmod 4755 "$pkgdir/opt/$_pkgname/chrome-sandbox"
  49. install -d "$pkgdir/usr/bin"
  50. ln -s "/opt/$_pkgname/linux-wallpaperengine" "$pkgdir/usr/bin/linux-wallpaperengine"
  51. install -d "$pkgdir/usr/share"
  52. cp -a "$pkgdir/opt/$_pkgname/share/icons" "$pkgdir/opt/$_pkgname/share/applications" "$pkgdir/usr/share/"
  53. install -Dm644 "$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  54. }