forked from openkylin/dtkcommon
Import Upstream version 5.6.19
This commit is contained in:
commit
d4a09c2697
|
@ -0,0 +1,44 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: dtkcommon
|
||||
Upstream-Contact: UnionTech Software Technology Co.,Ltd. <>
|
||||
Source: https://github.com/linuxdeepin/dtkcommon
|
||||
|
||||
# Config files
|
||||
Files: .gitignore configs/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# Readme
|
||||
Files: README.md README.zh_CN.md
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# debian
|
||||
Files: debian/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# github and OBS yaml files
|
||||
Files: .github/* *.yml *.yaml .obs/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# arch
|
||||
Files: archlinux/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# rpm
|
||||
Files: rpm/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# misc
|
||||
Files: misc/*
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
||||
|
||||
# cmake
|
||||
Files: *.cmake *CMakeLists.txt *.pc.in
|
||||
Copyright: None
|
||||
License: CC0-1.0
|
|
@ -0,0 +1,47 @@
|
|||
# SPDX-FileCopyrightText: 2022 Uniontech Software Technology Co.,Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set (DTK_VERSION "5.6.12" CACHE STRING "define project version")
|
||||
project(dtkcommon
|
||||
VERSION ${DTK_VERSION}
|
||||
DESCRIPTION "DTK common"
|
||||
HOMEPAGE_URL "https://github.com/linuxdeepin/dtkcommon"
|
||||
)
|
||||
message(STATUS "Project version: ${PROJECT_VERSION}")
|
||||
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX /usr)
|
||||
endif ()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(DIRECTORY configs DESTINATION "share/dsg" FILES_MATCHING PATTERN "*")
|
||||
|
||||
set(VERSION_SUFFIX)
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/misc/config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/DtkConfig.cmake"
|
||||
@ONLY
|
||||
)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DtkConfig.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk")
|
||||
set(VERSION_SUFFIX 6)
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/misc/config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Dtk6Config.cmake"
|
||||
@ONLY
|
||||
)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Dtk6Config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk6")
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/DtkBuildHelperConfigVersion.cmake"
|
||||
VERSION ${DTK_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DtkBuildHelperConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/DtkBuildHelper")
|
||||
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/cmake/DtkBuildHelper.cmake"
|
||||
RENAME "DtkBuildHelperConfig.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/DtkBuildHelper")
|
|
@ -0,0 +1,11 @@
|
|||
Copyright (c) 2017 - 2022 UnionTech Software Technology Co., Ltd.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,11 @@
|
|||
Copyright (c) 2017 - 2022 UnionTech Software Technology Co., Ltd.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,121 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
|
@ -0,0 +1,40 @@
|
|||
## dtkcommon
|
||||
|
||||
A public project for building DTK Library
|
||||
|
||||
## Dependencies
|
||||
|
||||
### build on debian/uos
|
||||
|
||||
requirements:
|
||||
|
||||
- pkg-config
|
||||
- libglib2.0-bin
|
||||
- qttools5-dev-tools
|
||||
- qtbase5-private-dev
|
||||
|
||||
### Build from source code
|
||||
|
||||
```bash
|
||||
cmake -B build && cmake --build build
|
||||
```
|
||||
|
||||
# Documentations
|
||||
|
||||
null
|
||||
|
||||
## Getting help
|
||||
|
||||
- [Official Forum](https://bbs.deepin.org/) for generic discussion and help.
|
||||
- [Developer Center](https://github.com/linuxdeepin/developer-center) for BUG report and suggestions.
|
||||
- [Wiki](https://wiki.deepin.org/)
|
||||
|
||||
## Getting involved
|
||||
|
||||
We encourage you to report issues and contribute changes
|
||||
|
||||
- [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en) (English)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under [BSD-3-Clause](LICENSE).
|
|
@ -0,0 +1,40 @@
|
|||
## 项目名称
|
||||
|
||||
dtkcommon:一个用来构建DTK库的公共项目
|
||||
|
||||
## 编译依赖
|
||||
|
||||
### 在debian/uos上构建
|
||||
|
||||
软件包依赖:
|
||||
|
||||
- pkg-config
|
||||
- libglib2.0-bin
|
||||
- qttools5-dev-tools
|
||||
- qtbase5-private-dev
|
||||
|
||||
### 从源代码构建
|
||||
|
||||
```bash
|
||||
mkdir build && cd build && qmake ../ && make
|
||||
```
|
||||
|
||||
# 文档
|
||||
|
||||
暂无
|
||||
|
||||
## 获取帮助
|
||||
|
||||
- 在[官方论坛](https://bbs.deepin.org/)上获取帮助或进行相关讨论
|
||||
- 在[开发者中心](https://github.com/linuxdeepin/developer-center)上反馈BUG和提出建议
|
||||
- [Wiki](https://wiki.deepin.org/)
|
||||
|
||||
## 参与其中
|
||||
|
||||
我们鼓励您报告问题并贡献更改
|
||||
|
||||
- [开发者贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en) (英文)
|
||||
|
||||
## 开源许可
|
||||
|
||||
本项目采用[BSD-3-Clause](LICENSE)授权。
|
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: justforlxz <justforlxz@gmail.com>
|
||||
pkgname=dtkcommon-git
|
||||
pkgver=5.5.17.r8.gfe3dd87
|
||||
pkgrel=1
|
||||
sourcename=dtkcommon
|
||||
sourcetars=("$sourcename"_"$pkgver".tar.xz)
|
||||
sourcedir="$sourcename"
|
||||
pkgdesc='DTK common modules'
|
||||
arch=('any')
|
||||
url="https://github.com/linuxdeepin/dtkcommon"
|
||||
license=('LGPL3')
|
||||
depends=('dconf')
|
||||
makedepends=('cmake' 'ninja')
|
||||
provides=('dtkcommon')
|
||||
groups=('deepin-git')
|
||||
source=("${sourcetars[@]}")
|
||||
sha512sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd "$sourcedir"
|
||||
version=$(echo $pkgver | awk -F'[+_~-]' '{print $1}')
|
||||
cmake . -GNinja \
|
||||
-DDTK_VERSION=$version \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
ninja
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$sourcedir"
|
||||
DESTDIR="$pkgdir" ninja install
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
# SPDX-FileCopyrightText: 2023 Uniontech Software Technology Co.,Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# generate dtk module config header file.
|
||||
#
|
||||
# MODULE_NAME - module name. ${MODULE_NAME}_config.h
|
||||
# DEST_DIR - used to get header file dest path, if it's empty, ${CMAKE_CURRENT_SOURCE_DIR} is used.
|
||||
# HEADERS - header files without .h extension.
|
||||
# EXT_CONTENTS - extra contents strings.
|
||||
#
|
||||
# e.g:
|
||||
# set(VERSION_DEC "#define DTK_VERSION_MAJOR 5"
|
||||
# "#define DTK_VERSION_MINOR 5"
|
||||
# "#define DTK_VERSION_PATCH 23"
|
||||
# "#define DTK_VERSION_BUILD 0"
|
||||
# "#define DTK_VERSION_STR \"5.5.23\"\n")
|
||||
# set(HEADERS ./DConfig ./DConfigFile ./DLog ./DObject)
|
||||
# dtk_gen_config_header(MODULE_NAME dtkcore
|
||||
# DEST_DIR include/global
|
||||
# HEADERS ${HEADERS}
|
||||
# EXT_CONTENTS ${VERSION_DEC})
|
||||
#
|
||||
# filename: ${CMAKE_CURRENT_SOURCE_DIR}/include/global/dtkcore_config.h
|
||||
# ==== file content begin ====
|
||||
# // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
||||
# //
|
||||
# // SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
#
|
||||
# #define DTK_VERSION_MAJOR 5
|
||||
# #define DTK_VERSION_MINOR 5
|
||||
# #define DTK_VERSION_PATCH 23
|
||||
# #define DTK_VERSION_BUILD 0
|
||||
# #define DTK_VERSION_STR "5.5.23"
|
||||
#
|
||||
# #define DTKCORE_CLASS_DConfig
|
||||
# #define DTKCORE_CLASS_DConfigFile
|
||||
# #define DTKCORE_CLASS_DLog
|
||||
# #define DTKCORE_CLASS_DObject
|
||||
# ==== file content end ====
|
||||
#
|
||||
function(dtk_gen_config_header)
|
||||
set(oneValueArgs MODULE_NAME DEST_DIR OUTPUT_VARIABLE)
|
||||
set(multiValueArgs HEADERS EXT_CONTENTS)
|
||||
|
||||
cmake_parse_arguments(_CONFIG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if (DEFINED _CONFIG_MSG)
|
||||
message("MODULE_NAME: ${_CONFIG_MODULE_NAME}\n"
|
||||
"DEST_DIR: ${_CONFIG_DEST_DIR}\n"
|
||||
"HEADERS: ${_CONFIG_HEADERS}\n")
|
||||
endif()
|
||||
|
||||
set(config_file_path ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
if (DEFINED _CONFIG_DEST_DIR)
|
||||
set(config_file_path ${_CONFIG_DEST_DIR})
|
||||
endif()
|
||||
|
||||
if (DEFINED _CONFIG_MODULE_NAME)
|
||||
string(APPEND config_file_path /${_CONFIG_MODULE_NAME}_config.h)
|
||||
message("generate file path:" ${config_file_path})
|
||||
else()
|
||||
message(FATAL_ERROR \"MODULE_NAME needs to be defined when calling dtk_gen_config_header\")
|
||||
endif()
|
||||
|
||||
set(LICENSE_DEC
|
||||
"// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.\n"
|
||||
"//\n"
|
||||
"// SPDX-License-Identifier: LGPL-3.0-or-later\n"
|
||||
"\n")
|
||||
|
||||
file(WRITE ${config_file_path} ${LICENSE_DEC})
|
||||
|
||||
foreach(_ext_content ${_CONFIG_EXT_CONTENTS})
|
||||
file(APPEND ${config_file_path} "${_ext_content}\n")
|
||||
endforeach()
|
||||
|
||||
foreach(_head_file ${_CONFIG_HEADERS})
|
||||
get_filename_component(classname ${_head_file} NAME)
|
||||
string(TOUPPER ${_CONFIG_MODULE_NAME} _UP_MODULE_NAME)
|
||||
file(APPEND ${config_file_path} "#define ${_UP_MODULE_NAME}_CLASS_${classname}\n")
|
||||
endforeach()
|
||||
|
||||
set(${_CONFIG_OUTPUT_VARIABLE} ${config_file_path} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# turn on coverage test
|
||||
function(dtk_setup_code_coverage TARGET)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(${TARGET} PRIVATE -fprofile-instr-generate -ftest-coverage)
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(${TARGET} PRIVATE -fprofile-arcs -ftest-coverage)
|
||||
endif()
|
||||
target_link_libraries(${TARGET} PRIVATE gcov)
|
||||
endfunction()
|
||||
|
||||
# set(OPT1 ON)
|
||||
# set(defs DEF1 DEF2 DEF3)
|
||||
# cmake -DDEF1=xxx1 -DDEF2=xxx2
|
||||
#
|
||||
# dtk_check_and_add_definitions(OPTIONS OPT1 OPT_NOT_EXISTED ${TARGET} DEFS ${defs})
|
||||
#
|
||||
# target_compile_definitions(${TARGET} PRIVATE -DOPT1)
|
||||
# target_compile_definitions(${TARGET} PRIVATE -DDEF1=xxx1)
|
||||
# target_compile_definitions(${TARGET} PRIVATE -DDEF2=xxx2)
|
||||
#
|
||||
function(dtk_check_and_add_definitions TARGET)
|
||||
cmake_parse_arguments(ARGV
|
||||
""
|
||||
""
|
||||
"OPTIONS;DEFS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
foreach(opt ${ARGV_OPTIONS})
|
||||
if (${opt})
|
||||
target_compile_definitions(${TARGET} PRIVATE -D${opt})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(def ${ARGV_DEFS})
|
||||
list(APPEND DEFINITIONS ${def})
|
||||
endforeach()
|
||||
|
||||
foreach(def ${DEFINITIONS})
|
||||
if (${def})
|
||||
target_compile_definitions(${TARGET} PRIVATE -D${def}=${${def}})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"magic": "dsg.config.meta",
|
||||
"version": "1.0",
|
||||
"contents": {
|
||||
"titlebarHeight": {
|
||||
"value": -1,
|
||||
"serial": 0,
|
||||
"name": "The height of DTitleBar",
|
||||
"name[zh_CN]": "标题栏高度",
|
||||
"description": "Configure the height of the DTitleBar",
|
||||
"description[zh_CN]": "配置标题栏的高度",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
},
|
||||
"themeType": {
|
||||
"value": 0,
|
||||
"serial": 0,
|
||||
"flags": [],
|
||||
"name": "The application theme type",
|
||||
"name[zh_CN]": "应用主题的颜色",
|
||||
"description": "The application theme type, which can be set to follow the system theme (0), light theme (1), dark theme (2)",
|
||||
"description[zh_CN]": "应用主题的颜色,可以设置为跟随系统(0)、浅色(1)、 深色(2),默认为跟随系统",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
},
|
||||
"featureUpdated": {
|
||||
"value": false,
|
||||
"serial": 0,
|
||||
"flags": [],
|
||||
"name": "Whether the application has new feature updates",
|
||||
"name[zh_CN]": "配置应用的更新状态",
|
||||
"description": "Configure the update status of the application",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
},
|
||||
"autoDisplayFeature": {
|
||||
"value": false,
|
||||
"serial": 0,
|
||||
"flags": [],
|
||||
"name": "The application automatically display new features once",
|
||||
"name[zh_CN]": "配置应用是否自动展示一次新特性",
|
||||
"description": "The application automatically display updated contents once",
|
||||
"permissions": "readwrite",
|
||||
"visibility": "public"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
dtkcommon (5.6.19-ok3) yangtze; urgency=medium
|
||||
|
||||
* XXTXTOP
|
||||
|
||||
-- XXTXTOP <kernelbuilder@lists.openkylin.top> Tue, 14 Nov 2023 00:42:29 +0800
|
||||
|
||||
dtkcommon (5.6.19-ok2) yangtze; urgency=medium
|
||||
|
||||
* Build for openkylin
|
||||
|
||||
-- bluesky <379865549@qq.com> Tue, 14 Nov 2023 00:06:46 +0800
|
||||
|
||||
dtkcommon (5.6.19) unstable; urgency=medium
|
||||
|
||||
[ root ]
|
||||
* UNRELEASE
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 23 Oct 2023 07:33:18 +0000
|
||||
|
||||
dtkcommon (5.6.18) unstable; urgency=medium
|
||||
|
||||
* chore: correct a typo in DtkBuildHelper.cmake
|
||||
Thanks to Felix Yan
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Wed, 18 Oct 2023 06:01:44 +0000
|
||||
|
||||
dtkcommon (5.6.17) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.17
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Fri, 08 Sep 2023 15:08:43 +0800
|
||||
|
||||
dtkcommon (5.6.16) unstable; urgency=medium
|
||||
|
||||
* feat(cmake): add cmake functions
|
||||
* chore: include DtkBuildHelper.cmake
|
||||
* fix: can't find DtkBuildHelper in Dtk6
|
||||
* chore: move DtkBuildHelper to separate module (#55)
|
||||
* chore: not include DtkBuildHelper (#56)
|
||||
* fix(build): archlinux build DTK_VERSION empty
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Tue, 22 Aug 2023 06:13:45 +0000
|
||||
|
||||
dtkcommon (5.6.15) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.15
|
||||
|
||||
-- Yixue Wang <wangyixue@deepin.org> Fri, 11 Aug 2023 10:15:55 +0800
|
||||
|
||||
dtkcommon (5.6.14) unstable; urgency=medium
|
||||
|
||||
* chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none)
|
||||
* refactor!: remove Qt features for DTK
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jul 2023 06:56:31 +0000
|
||||
|
||||
dtkcommon (5.6.12) unstable; urgency=medium
|
||||
|
||||
* chore: Sync by https://github.com/linuxdeepin/.github/commit/c5d10d3aeb9233a70f6290cb89d3b193f7b1f804(Influence: none)
|
||||
* chore: Sync by https://github.com/linuxdeepin/.github/commit/2e5e092ba3f86b16d1aabbabcf0bfd2ae65b19c8(Influence: none)
|
||||
* chore(cmake): optimize install directory
|
||||
* BREAKING_CHANGE: update to dtk6
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.org> Mon, 12 Jun 2023 17:00:43 +0800
|
||||
|
||||
dtkcommon (5.6.9) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.9
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 03 Apr 2023 09:45:23 +0800
|
||||
|
||||
dtkcommon (5.6.8) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.8
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Feb 2023 13:47:22 +0800
|
||||
|
||||
dtkcommon (5.6.4) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.4
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Mon, 09 Jan 2023 15:39:07 +0800
|
||||
|
||||
dtkcommon (5.6.3) unstable; urgency=medium
|
||||
|
||||
* Release 5.6.3
|
||||
|
||||
-- Deepin Packages Builder <packages@deepin.com> Tue, 13 Dec 2022 10:40:31 +0800
|
||||
|
||||
dtkcommon (5.5.23) unstable; urgency=medium
|
||||
|
||||
* use CMakeLists.txt to build package
|
||||
|
||||
-- Deepin Package Builder <packages@linuxdeepin.com> Fri, 25 Jul 2022 17:09:40 +0800
|
||||
|
||||
dtkcommon (0.0.1) unstable; urgency=medium
|
||||
|
||||
* ./debian
|
||||
|
||||
-- Deepin Package Builder <packages@linuxdeepin.com> Mon, 25 Jan 2021 16:01:40 +0800
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,21 @@
|
|||
Source: dtkcommon
|
||||
Section: libdevel
|
||||
Priority: optional
|
||||
Maintainer: Deepin Packages Builder <packages@deepin.com>
|
||||
Build-depends: debhelper (>= 9), cmake
|
||||
Standards-Version: 3.9.8
|
||||
Homepage: http://www.deepin.org/
|
||||
|
||||
Package: libdtkdata
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: dtk common files
|
||||
Used to store public configuration files
|
||||
|
||||
Package: libdtkcommon-dev
|
||||
Architecture: any
|
||||
Conflicts: libdtkcore-dev(<< 5.4.10)
|
||||
Replaces: libdtkcore-dev(<< 5.4.10)
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: dtk common files
|
||||
Used to store public build files
|
|
@ -0,0 +1,22 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: dtkcommon
|
||||
Source: https://github.com/linuxdeepin/dtkcommon
|
||||
|
||||
Files: *
|
||||
Copyright: Deepin Technology Co., Ltd.
|
||||
License: GPL-3+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
@ -0,0 +1 @@
|
|||
usr/lib/*/cmake/*
|
|
@ -0,0 +1 @@
|
|||
usr/share/dsg/configs/*
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/make -f
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
include /usr/share/dpkg/default.mk
|
||||
export QT_SELECT = qt5
|
||||
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
VERSION = $(DEB_VERSION_UPSTREAM)
|
||||
_PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
|
||||
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g')
|
||||
ifeq ($(_BUILD_VER),)
|
||||
CONFIG_VERSION = $(_PACK_VER)
|
||||
else
|
||||
CONFIG_VERSION = $(_PACK_VER).$(_BUILD_VER)
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- -DDTK_VERSION=$(CONFIG_VERSION)
|
||||
|
||||
#override_dh_auto_test:
|
||||
# echo "skip auto test"
|
||||
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -V "libdtkcommon (>= $(shell echo $(VERSION) | cut -d '.' -f 1,2))"
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -0,0 +1,23 @@
|
|||
package:
|
||||
id: dtkcommon
|
||||
name: dtkcommon
|
||||
kind: lib
|
||||
version: 5.6.3
|
||||
description: |
|
||||
dtkcommon used to store public configuration files
|
||||
|
||||
base:
|
||||
id: org.deepin.base/23.0.0
|
||||
|
||||
depends:
|
||||
- id: qtbase/5.15.7
|
||||
|
||||
source:
|
||||
kind: local
|
||||
|
||||
variables:
|
||||
extra_args: |
|
||||
-DDTK_VERSION=${VERSION}
|
||||
|
||||
build:
|
||||
kind: cmake
|
|
@ -0,0 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2023 Uniontech Software Technology Co.,Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
include(CMakeFindDependencyMacro)
|
||||
foreach(module ${Dtk@VERSION_SUFFIX@_FIND_COMPONENTS})
|
||||
find_dependency(Dtk@VERSION_SUFFIX@${module})
|
||||
endforeach()
|
|
@ -0,0 +1,51 @@
|
|||
Name: dtkcommon
|
||||
Version: 5.5.17
|
||||
Release: 1
|
||||
Summary: dtk common files
|
||||
Source0: %{name}-%{version}.orig.tar.xz
|
||||
|
||||
License: GPLv3
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
|
||||
Obsoletes: dtkcore <= 5.4.10
|
||||
Obsoletes: dtkcore-devel <= 5.4.10
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%description
|
||||
dtk common files
|
||||
|
||||
%package devel
|
||||
Summary: Development package for %{sname}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
dtk common files - devel
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
export QTDIR="%{_qt5_prefix}"
|
||||
export PATH="%{_qt5_bindir}:$PATH"
|
||||
%qmake_qt5
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install INSTALL_ROOT=%{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_datarootdir}/glib-2.0/schemas/*
|
||||
|
||||
%files devel
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_prefix}/lib/cmake/Dtk/*
|
||||
%{_libdir}/*/mkspecs/features/*
|
||||
%{_libdir}/*/mkspecs/modules/*
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue