Skip to content

Commit 9f92989

Browse files
committed
feat: add DTK6 documentation package and improve build profiles
1. Added new libdtk6core-doc package for DTK6 documentation with conditional build profile (!nodtk6 !nodoc) 2. Added new install file for libdtk6core-doc to install dtkcore.qch documentation 3. Reordered build dependencies: moved cmake to top and added conditional build profiles for Qt5/Qt6 tools and documentation 4. Updated debian/rules to enable BUILD_TESTING for both DTK5 and DTK6 builds 5. Modified DTK6 version check to use full DTK6_VERSION instead of MAJOR_MINOR for shared library versioning 6. Enabled BUILD_DOCS for DTK6 builds when documentation profile is active Log: Added separate documentation package for DTK6 Core library Influence: 1. Test building with different profiles (nodtk5, nodtk6, nodoc) to ensure conditional dependencies work correctly 2. Verify libdtk6core-doc package installation and documentation file placement 3. Test that BUILD_TESTING flag enables test builds properly 4. Verify shared library versioning uses correct version format for DTK6 5. Ensure backward compatibility with existing DTK5 packages feat: 添加DTK6文档包并改进构建配置 1. 新增libdtk6core-doc包用于DTK6文档,包含条件构建配置(!nodtk6 !nodoc) 2. 新增libdtk6core-doc安装文件以安装dtkcore.qch文档 3. 重新排序构建依赖:将cmake移至顶部,并为Qt5/Qt6工具和文档添加条件构建 配置 4. 更新debian/rules以同时为DTK5和DTK6构建启用BUILD_TESTING 5. 修改DTK6版本检查,使用完整DTK6_VERSION而非MAJOR_MINOR进行共享库版本 控制 6. 当文档配置激活时,为DTK6构建启用BUILD_DOCS Log: 为DTK6核心库新增独立的文档包 Influence: 1. 测试使用不同配置(nodtk5, nodtk6, nodoc)构建,确保条件依赖正常工作 2. 验证libdtk6core-doc包安装和文档文件放置位置 3. 测试BUILD_TESTING标志是否正确启用测试构建 4. 验证共享库版本控制对DTK6使用正确的版本格式 5. 确保与现有DTK5包的向后兼容性
1 parent ec973ab commit 9f92989

File tree

5 files changed

+42
-29
lines changed

5 files changed

+42
-29
lines changed

debian/control

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ Section: libdevel
33
Priority: optional
44
Maintainer: Shanshan Ye <yeshanshan@uniontech.com>
55
Build-Depends: debhelper-compat ( =12),
6+
cmake,
67
pkg-config,
78
libgtest-dev,
89
libdtkcommon-dev,
910
libicu-dev,
1011
libuchardet-dev,
1112
libdbus-1-dev,
12-
qttools5-dev-tools,
13-
qttools5-dev,
14-
libgsettings-qt-dev,
15-
libdtklog-dev,
16-
doxygen,
17-
qtbase5-private-dev,
18-
qt6-base-dev-tools,
19-
qt6-base-dev,
20-
qt6-base-private-dev,
21-
libdtk6log-dev,
22-
qt6-tools-dev,
23-
cmake
13+
qttools5-dev-tools <!nodtk5>,
14+
qttools5-dev <!nodtk5>,
15+
libgsettings-qt-dev <!nodtk5>,
16+
libdtklog-dev <!nodtk5>,
17+
qtbase5-private-dev <!nodtk5>,
18+
qt6-base-dev-tools <!nodtk6>,
19+
qt6-base-dev <!nodtk6>,
20+
qt6-base-private-dev <!nodtk6>,
21+
libdtk6log-dev <!nodtk6>,
22+
qt6-tools-dev <!nodtk6>,
23+
doxygen <!nodoc>
2424
Standards-Version: 3.9.8
2525

2626
Package: libdtk6core
@@ -53,6 +53,14 @@ Description: Development ToolKit Core Devel Library (DTK6 with Qt6)
5353
.
5454
This package contains the header files and development library symbolic links of DTK6 Core.
5555

56+
Package: libdtk6core-doc
57+
Architecture: any
58+
Build-Profiles: <!nodtk6 !nodoc>
59+
Description: Development ToolKit Core Documentation
60+
DTK Core is the base library of deepin Qt/C++ applications.
61+
.
62+
This package contains the doc files of DtkCore.
63+
5664
Package: libdtkcore5
5765
Architecture: any
5866
Depends: ${shlibs:Depends}, ${misc:Depends}, lshw

debian/libdtk6core-doc.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/share/qt6/doc/dtkcore.qch

debian/rules

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ endif
2828
endif
2929

3030
DTK5_MAJOR_MINOR := $(shell echo $(DTK5_VERSION) | cut -d '.' -f 1,2)
31-
DTK6_MAJOR_MINOR := $(shell echo $(DTK6_VERSION) | cut -d '.' -f 1,2)
3231
BUILD_DOCS := $(if $(filter nodoc,$(DEB_BUILD_PROFILES)),OFF,ON)
3332
BUILD_DTK5 := $(if $(filter nodtk5,$(DEB_BUILD_PROFILES)),OFF,ON)
3433
BUILD_DTK6 := $(if $(filter nodtk6,$(DEB_BUILD_PROFILES)),OFF,ON)
@@ -38,36 +37,36 @@ BUILD_DTK6 := $(if $(filter nodtk6,$(DEB_BUILD_PROFILES)),OFF,ON)
3837

3938
override_dh_auto_configure:
4039
ifeq ($(BUILD_DTK5),ON)
41-
mkdir -p build-dtk5
42-
QT_SELECT=qt5 dh_auto_configure --builddirectory=build-dtk5 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=$(BUILD_DOCS) -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=ON
40+
mkdir -p build5
41+
QT_SELECT=qt5 dh_auto_configure --builddirectory=build5 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_DOCS=$(BUILD_DOCS) -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=ON
4342
endif
4443
ifeq ($(BUILD_DTK6),ON)
45-
mkdir -p build-dtk6
46-
dh_auto_configure --builddirectory=build-dtk6 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=OFF -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=OFF
44+
mkdir -p build6
45+
dh_auto_configure --builddirectory=build6 -- $(DEB_CMAKE_EXTRA_FLAGS) -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_DOCS=$(BUILD_DOCS) -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata -DDTK5=OFF
4746
endif
4847

4948
override_dh_auto_build:
5049
ifeq ($(BUILD_DTK5),ON)
51-
QT_SELECT=qt5 dh_auto_build --builddirectory=build-dtk5
50+
QT_SELECT=qt5 dh_auto_build --builddirectory=build5
5251
endif
5352
ifeq ($(BUILD_DTK6),ON)
54-
dh_auto_build --builddirectory=build-dtk6
53+
dh_auto_build --builddirectory=build6
5554
endif
5655

5756
override_dh_auto_install:
5857
ifeq ($(BUILD_DTK5),ON)
59-
QT_SELECT=qt5 dh_auto_install --builddirectory=build-dtk5
58+
QT_SELECT=qt5 dh_auto_install --builddirectory=build5
6059
endif
6160
ifeq ($(BUILD_DTK6),ON)
62-
dh_auto_install --builddirectory=build-dtk6
61+
dh_auto_install --builddirectory=build6
6362
endif
6463

6564
override_dh_makeshlibs:
6665
ifeq ($(BUILD_DTK5),ON)
6766
dh_makeshlibs -V "libdtkcore5 (>= $(DTK5_MAJOR_MINOR))" -plibdtkcore5
6867
endif
6968
ifeq ($(BUILD_DTK6),ON)
70-
dh_makeshlibs -V "libdtk6core (>= $(DTK6_MAJOR_MINOR))" -plibdtk6core
69+
dh_makeshlibs -V "libdtk6core (>= $(DTK6_VERSION))" -plibdtk6core
7170
endif
7271

7372
override_dh_link:
@@ -80,8 +79,8 @@ endif
8079

8180
override_dh_auto_test:
8281
ifeq ($(BUILD_DTK5),ON)
83-
QT_SELECT=qt5 dh_auto_test --builddirectory=build-dtk5
82+
QT_SELECT=qt5 dh_auto_test --builddirectory=build5
8483
endif
8584
ifeq ($(BUILD_DTK6),ON)
86-
dh_auto_test --builddirectory=build-dtk6
85+
dh_auto_test --builddirectory=build6
8786
endif

dtkcore.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set (DSYSINFO_PREFIX "" CACHE STRING "PREFIX of DSysInfo")
1919

2020
set (BUILD_EXAMPLES ON CACHE BOOL "Build examples")
2121
set (BUILD_VERSION "0" CACHE STRING "buildversion")
22+
option(BUIILD_TESTING "Build tests" OFF)
2223

2324
if(UNIX AND NOT APPLE)
2425
set(LINUX TRUE)
@@ -38,9 +39,6 @@ else()
3839
# dtk6 not build doc
3940
set (BUILD_DOCS OFF CACHE BOOL "Generate doxygen-based documentation")
4041
endif()
41-
if (NOT CMAKE_BUILD_TYPE)
42-
set(CMAKE_BUILD_TYPE Release)
43-
endif()
4442

4543
if(NOT MSVC)
4644
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra")

tests/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ set(CMAKE_AUTOUIC ON)
99
set(CMAKE_AUTORCC ON)
1010
# dbus
1111
set(CMAKE_CXX_FLAGS "-fno-access-control")
12-
add_compile_options(-fsanitize=address)
13-
add_link_options(-fsanitize=address)
12+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
13+
add_compile_options(-fsanitize=address)
14+
add_link_options(-fsanitize=address)
15+
endif()
1416

1517
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui)
1618
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
@@ -118,4 +120,9 @@ target_include_directories( ${BIN_NAME} PUBLIC
118120
./testso/
119121
)
120122

123+
# Set RPATH to find libvtabletest*.so in the build directory
124+
set_target_properties(${BIN_NAME} PROPERTIES
125+
SKIP_BUILD_RPATH FALSE
126+
)
127+
121128
gtest_discover_tests(${BIN_NAME})

0 commit comments

Comments
 (0)