# SPDX-License-Identifier: MIT # ============================================================================= # Version definitions # ============================================================================= %global qt_support_version 0.1.0 %global hyprland_min_ver 0.54.2 %global hyprutils_ver 0.11.0 %global hyprlang_ver 0.6.8 # Qt cmake machinery appends $ORIGIN after our absolute RPATH (Fedora error 0008) %global __brp_check_rpaths %{nil} Name: hyprland-qt-support Version: %{qt_support_version} Release: 4%{?dist} Summary: Qt6 QML style provider for Hyprland apps License: BSD-3-Clause URL: https://github.com/hyprwm/hyprland-qt-support # Main source Source0: https://github.com/hyprwm/hyprland-qt-support/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # Vendored Hyprland libs Source10: https://github.com/hyprwm/hyprutils/archive/refs/tags/v%{hyprutils_ver}.tar.gz#/hyprutils-%{hyprutils_ver}.tar.gz Source11: https://github.com/hyprwm/hyprlang/archive/refs/tags/v%{hyprlang_ver}.tar.gz#/hyprlang-%{hyprlang_ver}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: pkgconf-pkg-config BuildRequires: pixman-devel BuildRequires: pugixml-devel BuildRequires: qt6-rpm-macros BuildRequires: cmake(Qt6Qml) BuildRequires: cmake(Qt6Quick) BuildRequires: cmake(Qt6QuickControls2) Requires: hyprland >= %{hyprland_min_ver} Requires: qt6-qtdeclarative%{?_isa} %description hyprland-qt-support provides a Qt6 QML style plugin that gives Hyprland apps (like hyprpolkitagent and hyprland-qtutils) a consistent visual style integrated with the Hyprland compositor theme. This package uses vendored Hyprland libraries installed by the hyprland package at /usr/libexec/hyprland/vendor/. %prep %autosetup -n %{name}-%{version} # Fix CMakeLists.txt: project() must be declared before set(CMAKE_CXX_STANDARD) # Upstream has them swapped, which breaks with CMake >= 3.27 patch -p1 << 'PATCH' --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.20) +# Get version +file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW) +string(STRIP ${VER_RAW} VER) + +project(hyprland-qt-support VERSION ${VER} LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -8,12 +14,6 @@ include(cmake/install-qml-module.cmake) option(BUILD_TESTER "Build style tester" OFF) -# Get version -file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW) -string(STRIP ${VER_RAW} VER) - -project(hyprland-qt-support VERSION ${VER} LANGUAGES CXX) - find_package(Qt6 6.6 REQUIRED COMPONENTS Qml Quick QuickControls2) find_package(PkgConfig REQUIRED) PATCH # Unpack vendored deps tar -xzf %{SOURCE10} tar -xzf %{SOURCE11} %build VENDOR_PREFIX="$(pwd)/vendor" export PKG_CONFIG_PATH="$VENDOR_PREFIX/lib64/pkgconfig:$VENDOR_PREFIX/lib/pkgconfig:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig" export CMAKE_PREFIX_PATH="$VENDOR_PREFIX" # Ensure vendor headers and libs are found regardless of how cmake/pkg-config exposes them export CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }-I$VENDOR_PREFIX/include" export LDFLAGS="${LDFLAGS:+$LDFLAGS }-L$VENDOR_PREFIX/lib64" # 1) hyprutils pushd hyprutils-%{hyprutils_ver} cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$VENDOR_PREFIX" \ -DCMAKE_PREFIX_PATH="$VENDOR_PREFIX" -DCMAKE_INSTALL_LIBDIR=lib64 cmake --build build --parallel %{_smp_build_ncpus} cmake --install build popd # 2) hyprlang pushd hyprlang-%{hyprlang_ver} cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$VENDOR_PREFIX" \ -DCMAKE_PREFIX_PATH="$VENDOR_PREFIX" -DCMAKE_INSTALL_LIBDIR=lib64 cmake --build build --parallel %{_smp_build_ncpus} cmake --install build popd # 3) hyprland-qt-support VENDOR_RPATH='%{_libexecdir}/hyprland/vendor/lib64:%{_libexecdir}/hyprland/vendor/lib' cmake -B build \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_PREFIX_PATH="$VENDOR_PREFIX" \ -DINSTALL_QMLDIR=%{_qt6_qmldir} \ -DBUILD_TESTER=OFF \ -DCMAKE_INSTALL_RPATH="$VENDOR_RPATH" \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON cmake --build build --parallel %{_smp_build_ncpus} %install DESTDIR=%{buildroot} cmake --install build %files %license LICENSE %doc README.md %{_libdir}/libhyprland-quick-style-impl.so %{_libdir}/libhyprland-quick-style.so %{_qt6_qmldir}/org/hyprland/ %changelog * Tue Mar 17 2026 Automated Build - 0.54.2-1 - Update to Hyprland 0.54.2 * Tue Mar 17 2026 Automated Build - 0.54.2-1 - Update to Hyprland 0.54.2 * Tue Mar 17 2026 Automated Build - 0.54.2-1 - Update to Hyprland 0.54.2 * Tue Mar 17 2026 Automated Build - 0.54.2-1 - Update to Hyprland 0.54.2 * Mon Mar 17 2026 Automated Build - 0.1.0-1 - Initial package for jwpkg/Hyprland-Fedora COPR