PKGBUILD 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. depends=('libnode' 'mpv' 'ffmpeg' 'glew' 'glfw' 'sdl2' 'freeglut' 'glu' 'fftw' 'lz4' 'freetype2' 'harfbuzz' 'gmp'
  11. 'dbus' 'wayland' 'libpulse' 'libglvnd' 'libx11' 'libxext' 'libxrandr' 'libxinerama' 'libxcursor' 'libxi' 'libxxf86vm'
  12. 'nss' 'at-spi2-core' 'libcups' 'libxcomposite' 'libxdamage' 'libxkbcommon' 'pango' 'cairo' 'alsa-lib' 'libdrm'
  13. 'mesa' 'libxshmfence')
  14. makedepends=('git' 'cmake' 'glm' 'wayland-protocols' 'python')
  15. provides=('linux-wallpaperengine')
  16. conflicts=('linux-wallpaperengine' 'linux-wallpaperengine-git' 'linux-wallpaperengine-kde-bin')
  17. # CEF ships its own stripped libraries, stripping them again only costs time
  18. options=('!strip' '!debug' '!lto')
  19. source=("$_pkgname::git+$url.git")
  20. sha256sums=('SKIP')
  21. pkgver() {
  22. cd "$_pkgname"
  23. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  24. }
  25. prepare() {
  26. cd "$_pkgname"
  27. git submodule update --init --recursive
  28. }
  29. build() {
  30. # CEF's wrapper library defines its own _FORTIFY_SOURCE and builds with -Werror
  31. CFLAGS="${CFLAGS//-Wp,-D_FORTIFY_SOURCE=?/}"
  32. CXXFLAGS="${CXXFLAGS//-Wp,-D_FORTIFY_SOURCE=?/}"
  33. export CFLAGS CXXFLAGS
  34. cmake -B build -S "$_pkgname" \
  35. -DCMAKE_BUILD_TYPE=Release \
  36. -DCMAKE_INSTALL_PREFIX="/opt/$_pkgname" \
  37. -Wno-dev
  38. cmake --build build
  39. }
  40. package() {
  41. "$_pkgname/tools/package_release.sh" build "$_pkgname" "$srcdir/dist"
  42. install -d "$pkgdir/opt"
  43. tar -xzf "$srcdir/dist/$_pkgname.tar.gz" -C "$pkgdir/opt"
  44. # without user namespaces Chromium falls back to the setuid sandbox
  45. chmod 4755 "$pkgdir/opt/$_pkgname/chrome-sandbox"
  46. install -d "$pkgdir/usr/bin"
  47. ln -s "/opt/$_pkgname/linux-wallpaperengine" "$pkgdir/usr/bin/linux-wallpaperengine"
  48. install -d "$pkgdir/usr/share"
  49. cp -a "$pkgdir/opt/$_pkgname/share/icons" "$pkgdir/opt/$_pkgname/share/applications" "$pkgdir/usr/share/"
  50. install -Dm644 "$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  51. }