From 4f0442c6624af4ca15ce1cef08c370e8de9b5a30 Mon Sep 17 00:00:00 2001 From: wangrong Date: Tue, 12 Aug 2025 21:40:37 +0800 Subject: [PATCH 1/2] chore: update build configuration for Qt compatibility - Modified build dependencies to support both Qt6 and Qt5. - Implemented automatic detection of Qt version in the build rules. - Set the -ffile-prefix-map compilation option to achieve reproducible builds Log: update build configuration for Qt compatibility --- debian/control | 16 ++++++++-------- debian/rules | 38 ++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/debian/control b/debian/control index e1c5e3f..c50cdf8 100644 --- a/debian/control +++ b/debian/control @@ -5,15 +5,15 @@ Maintainer: Deepin Packages Builder Build-Depends: debhelper (>= 9), pkg-config, - qt6-base-dev, - qt6-base-dev-tools, - qt6-base-private-dev, + qt6-base-dev | qt5-qmake, + qt6-base-dev-tools | hello, + qt6-base-private-dev | hello, libxcb-util0-dev, - libdtk6gui-dev, - libdtk6widget-dev, - qt6-tools-dev-tools, - qt6-tools-dev, - qt6-svg-dev, + libdtk6gui-dev | libdtkgui-dev, + libdtk6widget-dev | libdtkwidget-dev, + qt6-tools-dev-tools | qttools5-dev-tools, + qt6-tools-dev | hello, + qt6-svg-dev | libqt5svg5-dev, libxtst-dev Standards-Version: 3.9.8 Homepage: http://www.deepin.org diff --git a/debian/rules b/debian/rules index cc201f1..0e89700 100755 --- a/debian/rules +++ b/debian/rules @@ -1,22 +1,32 @@ #!/usr/bin/make -f -# 设置 Qt6 环境 -export QT_SELECT=qt6 -# 使用系统 PATH 中的 qmake6 -export QMAKE=qmake6 +# ----------------- Qt 版本自动检测逻辑 ----------------- +QMAKE_EXECUTABLE := $(shell command -v qmake6 2>/dev/null) -include /usr/share/dpkg/default.mk +ifeq ($(QMAKE_EXECUTABLE),) + # 未找到 Qt6 qmake, 回退到 Qt5 + QMAKE := qmake + export QT_SELECT=5 +else + # 找到 Qt6 qmake, 使用 Qt6 + QMAKE := qmake6 + export QT_SELECT=6 +endif +# --------------------------------------------------------- -# 指定使用 qmake 构建系统 -export DH_OPTIONS := --buildsystem=qmake +export FLAGS = "-g -Wdate-time -ffile-prefix-map=$(CURDIR)=." +export DH_VERBOSE = 1 %: - dh $@ --buildsystem=qmake + dh $@ override_dh_auto_configure: - $(QMAKE) \ - VERSION=$(VERSION) \ - PREFIX=/usr \ - LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ - VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM) \ - DEFINES+="VERSION=$(DEB_VERSION_UPSTREAM)" \ No newline at end of file + $(QMAKE) -makefile \ + QMAKE_CFLAGS_RELEASE=$(FLAGS) \ + QMAKE_CFLAGS_DEBUG=$(FLAGS) \ + QMAKE_CXXFLAGS_RELEASE=$(FLAGS) \ + QMAKE_CXXFLAGS_DEBUG=$(FLAGS) \ + QMAKE_LFLAGS_RELEASE=\"-Wl,-z,relro\" \ + QMAKE_LFLAGS_DEBUG=\"-Wl,-z,relro\" \ + QMAKE_STRIP=: \ + PREFIX=/usr From 91af2cb65852b239ca45a7872f3a9852ace46c47 Mon Sep 17 00:00:00 2001 From: wangrong Date: Tue, 12 Aug 2025 21:41:59 +0800 Subject: [PATCH 2/2] chore: Update version to 6.0.9 As title. Log: Update version to 6.0.9 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 931f535..00a019b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +deepin-picker (6.0.9) unstable; urgency=medium + + * chore: update build configuration for Qt compatibility + + -- wangrong Tue, 12 Aug 2025 21:40:54 +0800 + deepin-picker (6.0.8) unstable; urgency=medium * chore: Add new Lao translation file