we-manager.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. %global debug_package %{nil}
  2. %global __strip /bin/true
  3. %global __brp_mangle_shebangs %{nil}
  4. %global upstream_version 0.9.8
  5. %global appdir %{_libdir}/%{name}
  6. %global __provides_exclude_from ^%{appdir}/.*$
  7. %global __requires_exclude ^(lib(ffmpeg|vk_swiftshader|vulkan|EGL|GLESv2|steam_api)\\.so.*)$
  8. Name: we-manager
  9. Version: 0.9.8
  10. Release: 1%{?dist}
  11. Summary: Wallpaper Engine workshop manager
  12. License: MIT AND BSD-3-Clause AND Apache-2.0 AND MPL-2.0 AND LGPL-2.1-or-later
  13. URL: https://github.com/WallpaperEngineLover/we_manager
  14. Source0: %{url}/releases/download/v%{upstream_version}/%{name}_%{upstream_version}_amd64.deb
  15. ExclusiveArch: x86_64
  16. BuildRequires: binutils
  17. BuildRequires: tar
  18. BuildRequires: xz
  19. BuildRequires: desktop-file-utils
  20. Requires: gtk3
  21. Requires: nss
  22. Requires: xdg-utils
  23. Requires: at-spi2-core
  24. Requires: python3
  25. Recommends: libappindicator-gtk3
  26. Suggests: linux-wallpaperengine-kde
  27. %description
  28. Browse, organize and apply Wallpaper Engine workshop wallpapers on Linux with
  29. the engine from linux-wallpaperengine-kde. Handles playlists, per-wallpaper
  30. settings, backups and engine updates.
  31. The Electron and Chromium runtime is bundled in %{appdir}.
  32. %prep
  33. %setup -q -c -T
  34. ar x %{SOURCE0}
  35. tar -xf data.tar.*
  36. %build
  37. %install
  38. install -d %{buildroot}%{_libdir}
  39. mv "opt/WE Manager" %{buildroot}%{appdir}
  40. cp -a usr %{buildroot}/
  41. rm -f %{buildroot}%{_docdir}/%{name}/changelog.gz
  42. install -d %{buildroot}%{_bindir}
  43. ln -s ../%{_lib}/%{name}/we-manager %{buildroot}%{_bindir}/we-manager
  44. sed -i 's|^Exec=.*|Exec=we-manager %U|' %{buildroot}%{_datadir}/applications/we-manager.desktop
  45. sed -i '1s|^#!/usr/bin/env python3|#!/usr/bin/python3|' %{buildroot}%{appdir}/resources/desktop-icons-overlay.py
  46. (
  47. cd %{buildroot}
  48. find .%{appdir} -mindepth 0 -type d | sed 's|^\.|%%dir |'
  49. find .%{appdir} ! -type d | sed 's|^\.||' \
  50. | sed -e 's|^\(%{appdir}/LICENSE.electron.txt\)$|%%license \1|' \
  51. -e 's|^\(%{appdir}/LICENSES.chromium.html\)$|%%license \1|' \
  52. -e 's|^\(%{appdir}/chrome-sandbox\)$|%%verify(not mode) \1|'
  53. ) > %{_builddir}/app-files.list
  54. %check
  55. desktop-file-validate %{buildroot}%{_datadir}/applications/we-manager.desktop
  56. %post
  57. # the .deb's postinst: the setuid sandbox helper only where the kernel has no user namespaces
  58. if ! { [ -L /proc/self/ns/user ] && unshare --user true; } 2>/dev/null; then
  59. chmod 4755 %{appdir}/chrome-sandbox || :
  60. fi
  61. %files -f %{_builddir}/app-files.list
  62. %license %{_docdir}/%{name}/copyright
  63. %{_bindir}/we-manager
  64. %{_datadir}/applications/we-manager.desktop
  65. %{_datadir}/icons/hicolor/*/apps/we-manager.png
  66. %changelog
  67. * Thu Oct 29 2026 WallpaperEngineLover <260361707+WallpaperEngineLover@users.noreply.github.com> - 0.9.8-1
  68. - Repackage the 0.9.8 release as an rpm