repo: 通用 Linux 平台的 Debian deb 构建

This commit is contained in:
zinface 2023-02-17 00:09:34 +08:00
parent b2bdd382a1
commit 7a3ee61a91
4 changed files with 40 additions and 1 deletions

View File

@ -57,7 +57,7 @@ elseif(UNIX AND NOT APPLE AND NOT WIN32 AND NOT ANDROID)
# Linux Debian deb
if(USE_LINUX_DEBIAN)
# include(cmake/platforms/linux-debian.cmake)
include(cmake/platforms/linux-debian.cmake)
endif()
# Linux Appimage

View File

@ -0,0 +1,18 @@
# linux-debian.cmake
# Linux Debian
# 1. cmake/package-deb.descript
# 2. DebPackageConfig.cmake
option(USE_LINUX_DEBIAN "为 Linux 生成 deb 软件包" OFF)
if(USE_LINUX_DEBIAN)
find_package(DebPackage PATHS ${CMAKE_SOURCE_DIR})
add_package_descript(cmake/package-deb.descript)
endif(USE_LINUX_DEBIAN)

19
linux-debian.mk Normal file
View File

@ -0,0 +1,19 @@
# Linux Debian - 通用 Linux 平台 Debian 构建方案
include linux-universal.mk
CPUS=$(shell nproc)
# builddir := build
# sourcedir := .
# CMAKE_DEBUG := -DCMAKE_BUILD_TYPE=Debug
# CMAKE_RELEASE := -DCMAKE_BUILD_TYPE=Release
CMAKE_OPTIONS := -DUSE_LINUX_DEBIAN=ON $(CMAKE_OPTIONS)
package: linux-universal-release
make -C $(builddir) package
linux-build-options:
@echo $(CMAKE_OPTIONS)
# 此配置为构建 linux debian 通用版本构建

View File

@ -1,8 +1,10 @@
Msg := 'Build with the following configuration:'
One := '1. make -f linux-universal.mk'
Two := '2. make -f linux-debian.mk package'
all:
@echo $(Msg)
@echo $(One) "\n\t默认的通用 Linux 平台构建."
@echo $(Two) "\n\t通用 Linux 平台的 Debian deb 构建."