Skip to content

Commit 6f8d5cb

Browse files
committed
refactor: unify dtk5 and dtk6 version handling
Removed version mapping logic for DTK5 and DTK6 as part of unified build transformation. The changes include: 1. Removed DTK5_VERSION, DTK6_VERSION, and DTK5_MAJOR_MINOR variable definitions 2. Removed VERSION, PACK_VER, and BUILD_VER variable definitions 3. Removed -DBUILD_VERSION and -DDTK_VERSION CMake arguments from both DTK5 and DTK6 build configurations 4. Removed override_dh_makeshlibs target that used version-specific dependency specifications This refactoring is necessary because dtk5 and dtk6 now share the same version numbers, eliminating the need for separate version mapping logic. The unified build approach simplifies the build system and reduces maintenance complexity. Influence: 1. Verify that both DTK5 and DTK6 packages build successfully without version mapping 2. Test that the resulting packages have correct version numbers 3. Check that shared library dependencies are properly handled without version-specific overrides 4. Validate that Build-Profiles (nodtk5, nodtk6, nodoc) still work correctly 5. Test package installation and runtime functionality refactor: 统一dtk5和dtk6版本处理逻辑 作为统一构建改造的一部分,移除了DTK5和DTK6的版本映射逻辑。具体变更包括: 1. 移除了DTK5_VERSION、DTK6_VERSION和DTK5_MAJOR_MINOR变量定义 2. 移除了VERSION、PACK_VER和BUILD_VER变量定义 3. 从DTK5和DTK6构建配置中移除了-DBUILD_VERSION和-DDTK_VERSION CMake参数 4. 移除了使用版本特定依赖规范的override_dh_makeshlibs目标 此次重构是必要的,因为dtk5和dtk6现在使用相同的版本号,不再需要单独的版本 映射逻辑。统一构建方法简化了构建系统并降低了维护复杂度。 Influence: 1. 验证DTK5和DTK6包在没有版本映射的情况下能否成功构建 2. 测试生成的包是否具有正确的版本号 3. 检查共享库依赖关系在没有版本特定覆盖的情况下是否正确处理 4. 验证Build-Profiles(nodtk5、nodtk6、nodoc)是否仍能正常工作 5. 测试软件包安装和运行时功能
1 parent bbe233a commit 6f8d5cb

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

debian/rules

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,13 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z
1111
# reproducible 编译参数
1212
DEB_CMAKE_EXTRA_FLAGS += -DCMAKE_SKIP_BUILD_RPATH=ON
1313

14-
# 版本映射:x.y.z -> 5.y.z 和 6.y.z
15-
DTK5_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -E 's/^[0-9]+(\.|[^0-9]|$$)/5\1/')
16-
DTK6_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -E 's/^[0-9]+(\.|[^0-9]|$$)/6\1/')
17-
DTK5_MAJOR_MINOR := $(shell echo $(DTK5_VERSION) | cut -d '.' -f 1,2)
18-
1914
# Build-Profiles 控制
2015
BUILD_DOCS := $(if $(filter nodoc,$(DEB_BUILD_PROFILES)),OFF,ON)
2116
BUILD_DTK5 := $(if $(filter nodtk5,$(DEB_BUILD_PROFILES)),OFF,ON)
2217
BUILD_DTK6 := $(if $(filter nodtk6,$(DEB_BUILD_PROFILES)),OFF,ON)
2318

2419
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
2520

26-
VERSION = $(DEB_VERSION_UPSTREAM)
27-
PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
28-
# Fix: invalid digit "8" in octal constant. e.g. u008 ==> 008 ==> 8
29-
BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
30-
3121
%:
3222
dh $@
3323

@@ -38,8 +28,6 @@ ifeq ($(BUILD_DTK5),ON)
3828
$(DEB_CMAKE_EXTRA_FLAGS) \
3929
-DBUILD_TESTING=OFF \
4030
-DBUILD_DOCS=$(BUILD_DOCS) \
41-
-DBUILD_VERSION=$(BUILD_VER) \
42-
-DDTK_VERSION=$(PACK_VER) \
4331
-DDTK5=ON
4432
endif
4533
ifeq ($(BUILD_DTK6),ON)
@@ -48,8 +36,6 @@ ifeq ($(BUILD_DTK6),ON)
4836
$(DEB_CMAKE_EXTRA_FLAGS) \
4937
-DBUILD_TESTING=OFF \
5038
-DBUILD_DOCS=$(BUILD_DOCS) \
51-
-DBUILD_VERSION=$(BUILD_VER) \
52-
-DDTK_VERSION=$(PACK_VER) \
5339
-DDTK5=OFF
5440
endif
5541

@@ -69,14 +55,6 @@ ifeq ($(BUILD_DTK6),ON)
6955
dh_auto_install --builddirectory=build6
7056
endif
7157

72-
override_dh_makeshlibs:
73-
ifeq ($(BUILD_DTK5),ON)
74-
dh_makeshlibs -V "libdtkdeclarative5 (>= $(DTK5_MAJOR_MINOR))" -plibdtkdeclarative5
75-
endif
76-
ifeq ($(BUILD_DTK6),ON)
77-
dh_makeshlibs -V "libdtk6declarative (>= $(DTK6_VERSION))" -plibdtk6declarative
78-
endif
79-
8058
override_dh_auto_test:
8159
ifeq ($(BUILD_DTK5),ON)
8260
QT_SELECT=qt5 dh_auto_test --builddirectory=build5

0 commit comments

Comments
 (0)