Merge branch 'cmake-with-modules' into officil-develop

This commit is contained in:
zinface 2023-02-21 23:03:59 +08:00
commit 16462bea32
3 changed files with 22 additions and 1 deletions

View File

@ -129,6 +129,12 @@ function(set_package_vars _IN_KEY _IN_VAL)
message("--> 日历化版本: ${_IN_VAL}")
endif(_CalVer EQUAL "0")
find_str("${_IN_KEY}" "OSD" _OSDVer)
if(_OSDVer EQUAL "0")
set(OSDVer "${_IN_VAL}" PARENT_SCOPE)
message("--> 声明发行版号: ${_IN_VAL}")
endif(_OSDVer EQUAL "0")
find_str("${_IN_KEY}" "Architecture" _Architecture)
if(_Architecture EQUAL "0")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${_IN_VAL}" PARENT_SCOPE)
@ -264,6 +270,19 @@ function(add_package_descript IN_DES)
endif("${CalVer}" STREQUAL "true")
####################### OS Release ######################
if("${OSDVer}" STREQUAL "true")
exec_program(lsb_release ARGS -si
OUTPUT_VARIABLE _OSI
)
exec_program(lsb_release ARGS -sr
OUTPUT_VARIABLE _OSR
)
if(NOT "${_OSI}" STREQUAL "" AND NOT "${_OSR}" STREQUAL "")
set(PACKAGE_SUFFIX "${PACKAGE_SUFFIX}_${_OSI}${_OSR}")
endif(NOT "${_OSI}" STREQUAL "" AND NOT "${_OSR}" STREQUAL "")
endif("${OSDVer}" STREQUAL "true")
##################### deb file name #####################
set(_Package "${CPACK_DEBIAN_PACKAGE_NAME}")

View File

@ -25,6 +25,8 @@ Package: com.hmja.notepad
Version: auto
# 日历化尾部版本
CalVer: true
# 声明发行版号(类似于 Debian11,Debian为OS标志11为发行版号)
OSD: true
# 软件包架构(自动)
Architecture: auto
# 软件包属于的系统部分[admin|cli-mono|comm|database|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnu-r|gnustep|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libdevel|libs|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|tasks|tex|text|utils|vcs|video|web|x11|xfce|zope]

View File

@ -63,7 +63,7 @@ if(USE_LINUX_UOS)
# ------------------ deb ------------------ #
# 1. Uos Uos
set(PACKAGE_SUFFIX "_Uos")
# set(PACKAGE_SUFFIX "_onlyUos")
# 2. 使 debian deb
find_package(DebPackage PATHS ${CMAKE_SOURCE_DIR})