From 38346d953ce1d074d4daa201108750ec769d35d8 Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Wed, 3 Dec 2025 14:57:12 -0500 Subject: [PATCH] Introduce hyprland-qt-support package --- .../workflows/build-hyprland-qt-support.yml | 33 ++++++++++++++ hyprland-qt-support/cmake.patch | 29 ++++++++++++ hyprland-qt-support/hyprland-qt-support.spec | 44 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 .gitea/workflows/build-hyprland-qt-support.yml create mode 100644 hyprland-qt-support/cmake.patch create mode 100644 hyprland-qt-support/hyprland-qt-support.spec diff --git a/.gitea/workflows/build-hyprland-qt-support.yml b/.gitea/workflows/build-hyprland-qt-support.yml new file mode 100644 index 0000000..9369d80 --- /dev/null +++ b/.gitea/workflows/build-hyprland-qt-support.yml @@ -0,0 +1,33 @@ +name: Build hyprland-qt-support +on: + push: + branches: + - main + paths: + - .gitea/workflows/build-hyprland-qt-support.yml + - "hyprland-qt-support/**" + workflow_dispatch: + +jobs: + build_push: + name: Build and push image + runs-on: ubuntu-latest + + steps: + - name: Setup environment + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y podman iptables + + # These stage versions are pinned by https://github.com/renovatebot/renovate + - name: Checkout + uses: actions/checkout@v6 # v5 + + - name: Build RPM and Upload + uses: https://git.hydrosaber.com/hydros/build-rpm@main + with: + spec-file-path: ./hyprland-qt-support/hyprland-qt-support.spec + repository-user: eriq12 + repository-user-token: ${{ secrets.RPM_PACKAGE_TOKEN }} + extra-source-directory: ./hyprland-qt-support diff --git a/hyprland-qt-support/cmake.patch b/hyprland-qt-support/cmake.patch new file mode 100644 index 0000000..b2f7e18 --- /dev/null +++ b/hyprland-qt-support/cmake.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a10b688..3c20875 100644 +--- 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) + \ No newline at end of file diff --git a/hyprland-qt-support/hyprland-qt-support.spec b/hyprland-qt-support/hyprland-qt-support.spec new file mode 100644 index 0000000..36cc4e5 --- /dev/null +++ b/hyprland-qt-support/hyprland-qt-support.spec @@ -0,0 +1,44 @@ +Name: hyprland-qt-support +Version: 0.1.0 +Release: %autorelease -b8 +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 +Patch: cmake.patch + +# 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 +%autosetup -p1 + +%build +%cmake -DINSTALL_QMLDIR=%{_qt6_qmldir} +%cmake_build + +%install +%cmake_install + +%files +%license LICENSE +%doc README.md +%{_libdir}/libhyprland-quick-style-impl.so +%{_libdir}/libhyprland-quick-style.so +%{_qt6_qmldir}/org/hyprland/ + +%changelog +%autochangelog