From 31872391753d8962765f0730a2b5d281732c0216 Mon Sep 17 00:00:00 2001 From: Elysia <1391048988@qq.com> Date: Sun, 9 Nov 2025 12:33:17 +0800 Subject: [PATCH 1/4] Change quickshell-git to local build --- sdata/dist-fedora/SPECS/quickshell-git.spec | 89 +++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sdata/dist-fedora/SPECS/quickshell-git.spec diff --git a/sdata/dist-fedora/SPECS/quickshell-git.spec b/sdata/dist-fedora/SPECS/quickshell-git.spec new file mode 100644 index 000000000..a0b23bfd8 --- /dev/null +++ b/sdata/dist-fedora/SPECS/quickshell-git.spec @@ -0,0 +1,89 @@ +# Original-Spec: https://copr-dist-git.fedorainfracloud.org/packages/errornointernet/quickshell/quickshell-git.git/plain/quickshell-git.spec?h=master + +%bcond_with asan + +%global commit db1777c20b936a86528c1095cbcb1ebd92801402 +%global commits 699 +%global snapdate 20251030 +%global tag 0.2.1 + +Name: quickshell-git +Version: %{tag}^%{commits}.git%(c=%{commit}; echo ${c:0:7}) +Release: 0%{?dist} +Summary: Flexible QtQuick based desktop shell toolkit + +License: LGPL-3.0-only AND GPL-3.0-only +URL: https://github.com/quickshell-mirror/quickshell +Source0: %{url}/archive/%{commit}/quickshell-%{commit}.tar.gz + +Conflicts: quickshell <= %{tag} + +%if 0%{fedora} >= 43 +BuildRequires: breakpad-static +%endif +BuildRequires: cmake +BuildRequires: cmake(Qt6Core) +BuildRequires: cmake(Qt6Qml) +BuildRequires: cmake(Qt6ShaderTools) +BuildRequires: cmake(Qt6WaylandClient) +BuildRequires: gcc-c++ +BuildRequires: ninja-build +BuildRequires: pkgconfig(breakpad) +BuildRequires: pkgconfig(CLI11) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(jemalloc) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(polkit-agent-1) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: qt6-qtbase-private-devel +BuildRequires: spirv-tools + +%if %{with asan} +BuildRequires: libasan +%endif + +Provides: desktop-notification-daemon + +%description +Flexible toolkit for making desktop shells with QtQuick, targeting +Wayland and X11. + +%prep +wget --content-disposition -q -N -P %{_sourcedir} %{url}/archive/%{commit}/quickshell-%{commit}.tar.gz +%autosetup -n quickshell-%{commit} -p1 + +%build +%cmake -GNinja \ +%if %{with asan} + -DASAN=ON \ +%endif + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DDISTRIBUTOR="Fedora COPR (errornointernet/quickshell)" \ + -DDISTRIBUTOR_DEBUGINFO_AVAILABLE=YES \ + -DGIT_REVISION=%{commit} \ + -DINSTALL_QML_PREFIX=%{_lib}/qt6/qml +%cmake_build + +%install +%cmake_install + +%files +%license LICENSE +%license LICENSE-GPL +%doc BUILD.md +%doc CONTRIBUTING.md +%doc README.md +%doc changelog/v%{tag}.md +%{_bindir}/qs +%{_bindir}/quickshell +%{_datadir}/applications/org.quickshell.desktop +%{_datadir}/icons/hicolor/scalable/apps/org.quickshell.svg +%{_libdir}/qt6/qml/Quickshell + +%changelog +%autochangelog From 87f5bc587023f88834f63357f51df0e392c5330d Mon Sep 17 00:00:00 2001 From: Elysia <1391048988@qq.com> Date: Sun, 9 Nov 2025 12:33:38 +0800 Subject: [PATCH 2/4] Change hyprland-qt-support to local build --- .../SPECS/hyprland-qt-support.spec | 46 +++++++++++++++++++ sdata/dist-fedora/install-deps.sh | 35 +++++++------- 2 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 sdata/dist-fedora/SPECS/hyprland-qt-support.spec diff --git a/sdata/dist-fedora/SPECS/hyprland-qt-support.spec b/sdata/dist-fedora/SPECS/hyprland-qt-support.spec new file mode 100644 index 000000000..73d7ea0da --- /dev/null +++ b/sdata/dist-fedora/SPECS/hyprland-qt-support.spec @@ -0,0 +1,46 @@ +# Original-Spec: https://copr-dist-git.fedorainfracloud.org/packages/solopasha/hyprland/hyprland-qt-support.git/plain/hyprland-qt-support.spec?h=master + +Name: hyprland-qt-support +Version: 0.1.0 +Release: %autorelease -b9 +Summary: A Qt6 Qml style provider for hypr* apps +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprland-qt-support +Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: qt6-rpm-macros + +BuildRequires: cmake(Qt6Quick) +BuildRequires: cmake(Qt6QuickControls2) +BuildRequires: cmake(Qt6Qml) + +BuildRequires: pkgconfig(hyprlang) + +%description +%{summary}. + +%prep +wget --content-disposition -q -N -P %{_sourcedir} %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +%autosetup -p1 + +%build +%cmake -DINSTALL_QMLDIR=%{_qt6_qmldir} +%cmake_build + +%install +%cmake_install + +%files +%license LICENSE +%doc README.md +%{_prefix}/lib/libhyprland-quick-style-impl.so +%{_prefix}/lib/libhyprland-quick-style.so +%{_qt6_qmldir}/org/hyprland/ + +%changelog +%autochangelog \ No newline at end of file diff --git a/sdata/dist-fedora/install-deps.sh b/sdata/dist-fedora/install-deps.sh index 8f813da84..457290401 100644 --- a/sdata/dist-fedora/install-deps.sh +++ b/sdata/dist-fedora/install-deps.sh @@ -13,7 +13,7 @@ case $SKIP_SYSUPDATE in esac # Development-tools installation -v sudo dnf install @development-tools fedora-packager rpmdevtools fonts-rpm-macros -y +v sudo dnf install @development-tools fedora-packager rpmdevtools fonts-rpm-macros qt6-rpm-macros -y # COPR repositories v sudo dnf copr enable solopasha/hyprland -y @@ -42,17 +42,12 @@ v sudo dnf install ${themes_deps[@]} -y # Hyprland hyprland_deps=( - hypridle hyprland hyprlock hyprpicker - hyprsunset xdg-desktop-portal-hyprland wl-clipboard + hypridle hyprland hyprlock hyprpicker hyprsunset + xdg-desktop-portal-hyprland wl-clipboard ) v sudo dnf install --setopt="install_weak_deps=False" "${hyprland_deps[@]}" -y - -## About `hyprland-qtutils` and `hyprland-qt-support` -# The hyprland-qt-support's GitHub repository requires Qt 6.6 or higher, which I think makes DNF's requirement of Qt 6.9 too strict; it should also support Qt 6.10. -# On distro like Arch Linux, `hyprland-qtutils` and `hyprland-qt-support` are in dependency chain already so no need to add them as deps explicitly; -# However on Fedora, if this package is not installed, a yellow warning⚠️ will appear every time you log in to Hyprland. -v dnf download hyprland-qt-support && v sudo rpm -ivh --nodeps hyprland-qt-support-*.fc$(rpm -E %fedora).$(uname -m).rpm -v sudo dnf install hyprland-qtutils -y +# hyprland-qt-support's build deps +v sudo dnf install hyprlang-devel # KDE v sudo dnf install bluedevil gnome-keyring NetworkManager plasma-nm polkit-kde dolphin plasma-systemsettings -y @@ -79,17 +74,16 @@ quickshell_custom_deps=( qt6-qtquicktimeline qt6-qtsensors qt6-qttools qt6-qttranslations qt6-qtvirtualkeyboard qt6-qtwayland kdialog kf6-syntax-highlighting ) +quickshell_build_deps=( + breakpad-static qt6-qtdeclarative-devel qt6-qtshadertools-devel breakpad-devel + gcc-c++ ninja-build mesa-libgbm-devel cli11-devel glib2-devel jemalloc-devel + libdrm-devel pipewire-devel pam-devel polkit-devel wayland-devel wayland-protocols-devel + qt6-qtbase-private-devel spirv-tools + libasan +) v sudo dnf install "${quickshell_deps[@]}" -y v sudo dnf install "${quickshell_custom_deps[@]}" -y -# Dynamically control the version of quickshell -qs_version=$(dnf list --showduplicates quickshell-git 2>/dev/null | - grep -E "\.git${_qs_shortcommit}(-|$)" | - awk '{print $2}' | - sort -V | - tail -n1) -v sudo dnf versionlock delete quickshell-git 2>/dev/null -v sudo dnf install quickshell-git-${qs_version} -v sudo dnf versionlock add quickshell-git +v sudo dnf install "${quickshell_build_deps[@]}" -y # Screencapture v sudo dnf install hyprshot slurp swappy tesseract tesseract-langpack-eng tesseract-langpack-chi_sim wf-recorder -y @@ -121,3 +115,6 @@ install_RPMS() { showfun install_RPMS v install_RPMS + +# hyprland-qtutils depends on hyprland-qt-support +v sudo dnf install hyprland-qtutils -y \ No newline at end of file From 7236d2f50b8881cef575f73742529650f2a9d540 Mon Sep 17 00:00:00 2001 From: Elysia <1391048988@qq.com> Date: Sun, 9 Nov 2025 12:39:16 +0800 Subject: [PATCH 3/4] revision. --- sdata/dist-fedora/install-deps.sh | 2 +- sdata/lib/environment-variables.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sdata/dist-fedora/install-deps.sh b/sdata/dist-fedora/install-deps.sh index 457290401..f055b179a 100644 --- a/sdata/dist-fedora/install-deps.sh +++ b/sdata/dist-fedora/install-deps.sh @@ -108,7 +108,7 @@ install_RPMS() { x rpmbuild -bb --define "_topdir $rpmbuildroot" $spec_file done mapfile -t -d '' local_rpms < <(find "$rpmbuildroot/RPMS" -maxdepth 2 -type f -name '*.rpm' -not -name '*debug*' -print0) - echo "${STY_BLUE}Next command:${STY_RST} sudo dnf install ${local_rpms[@]} -y" + echo -e "${STY_BLUE}Next command:${STY_RST} sudo dnf install ${local_rpms[@]} -y" x sudo dnf install "${local_rpms[@]}" -y x cd ${REPO_ROOT} } diff --git a/sdata/lib/environment-variables.sh b/sdata/lib/environment-variables.sh index b2153ae0a..71ca6d023 100644 --- a/sdata/lib/environment-variables.sh +++ b/sdata/lib/environment-variables.sh @@ -26,6 +26,4 @@ STY_RST='\e[00m' # Used by register_temp_file() declare -a TEMP_FILES_TO_CLEANUP=() -# Pinned commit for quickshell -_qs_commit='db1777c20b936a86528c1095cbcb1ebd92801402' -_qs_shortcommit=$(echo ${_qs_commit} | cut -c1-7) + From b322af705135d193e2420c7a34cabe1c4b783698 Mon Sep 17 00:00:00 2001 From: Elysia <1391048988@qq.com> Date: Sun, 9 Nov 2025 13:07:35 +0800 Subject: [PATCH 4/4] Fixed a minor issue --- sdata/dist-fedora/SPECS/hyprland-qt-support.spec | 2 +- sdata/dist-fedora/install-deps.sh | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sdata/dist-fedora/SPECS/hyprland-qt-support.spec b/sdata/dist-fedora/SPECS/hyprland-qt-support.spec index 73d7ea0da..c4f8bf057 100644 --- a/sdata/dist-fedora/SPECS/hyprland-qt-support.spec +++ b/sdata/dist-fedora/SPECS/hyprland-qt-support.spec @@ -43,4 +43,4 @@ wget --content-disposition -q -N -P %{_sourcedir} %{url}/archive/v%{version}/%{n %{_qt6_qmldir}/org/hyprland/ %changelog -%autochangelog \ No newline at end of file +%autochangelog diff --git a/sdata/dist-fedora/install-deps.sh b/sdata/dist-fedora/install-deps.sh index f055b179a..7a4da7138 100644 --- a/sdata/dist-fedora/install-deps.sh +++ b/sdata/dist-fedora/install-deps.sh @@ -42,12 +42,12 @@ v sudo dnf install ${themes_deps[@]} -y # Hyprland hyprland_deps=( - hypridle hyprland hyprlock hyprpicker hyprsunset + hypridle hyprland hyprlock hyprpicker hyprsunset xdg-desktop-portal-hyprland wl-clipboard ) v sudo dnf install --setopt="install_weak_deps=False" "${hyprland_deps[@]}" -y # hyprland-qt-support's build deps -v sudo dnf install hyprlang-devel +v sudo dnf install hyprlang-devel -y # KDE v sudo dnf install bluedevil gnome-keyring NetworkManager plasma-nm polkit-kde dolphin plasma-systemsettings -y @@ -75,10 +75,9 @@ quickshell_custom_deps=( qt6-qtvirtualkeyboard qt6-qtwayland kdialog kf6-syntax-highlighting ) quickshell_build_deps=( - breakpad-static qt6-qtdeclarative-devel qt6-qtshadertools-devel breakpad-devel - gcc-c++ ninja-build mesa-libgbm-devel cli11-devel glib2-devel jemalloc-devel - libdrm-devel pipewire-devel pam-devel polkit-devel wayland-devel wayland-protocols-devel - qt6-qtbase-private-devel spirv-tools + breakpad-static breakpad-devel gcc-c++ ninja-build mesa-libgbm-devel cli11-devel glib2-devel + jemalloc-devel libdrm-devel pipewire-devel pam-devel polkit-devel wayland-devel wayland-protocols-devel + qt6-qtdeclarative-devel qt6-qtshadertools-devel qt6-qtbase-private-devel spirv-tools libasan ) v sudo dnf install "${quickshell_deps[@]}" -y