Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:[tag] new version 6.5.2 #120

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion arm64/linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ build: |

# 获取版本号
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
# 使用sed命令替换version的值
sed -i "s/^ version: .*/ version: ${VERSION}.1/" linglong.yaml

cmake -B build ${conf_args} \
-DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \
Expand All @@ -34,7 +36,15 @@ build: |
-DVERSION=${VERSION}

cmake --build build -j`nproc`
cmake --build build --target install
cmake --build build --target install > install.log 2>&1

# 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
LDD_FILES=(
deepin-font-manager
)

# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"

sources:
# - kind: git
Expand Down
9 changes: 8 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
deepin-movie-reborn (6.5.2) unstable; urgency=medium

* New version 6.5.2
* Slimming down the linglong layer package.

-- re2zero <[email protected]> Fri, 27 Sep 2024 14:55:16 +0800

deepin-font-manager (6.5.1) unstable; urgency=medium

* feat: [translation]add transifex config(Task: 361363)
Expand All @@ -9,7 +16,7 @@ deepin-font-manager (6.5.0) unstable; urgency=medium
* New version 6.5.0
* Adapt linglong.

-- re2zero <[email protected]> Fri, 13 Sep 2024 14:06:16 +0800
-- re2zero <[email protected]> Fri, 13 Sep 2024 14:06:16 +0800

deepin-font-manager (6.0.4) unstable; urgency=medium

Expand Down
74 changes: 74 additions & 0 deletions deploy_dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# SPDX-FileCopyrightText: 2023-2024 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: GPL-3.0-or-later

#!/bin/bash
set -e

# 生成安装目录/文件和运行时依赖的必要库
# 获取应用id
ID_VALUE=$(awk -F ': ' '/^ id: / {print $2}' linglong.yaml)

## 获取安装的文件列表并写入安装脚本(排除头文件、pc和cmake文件)
# cmake 安装
if ! grep -- "-- Installing:" install.log | awk '{print $NF}' | grep -vE '\.(h|cmake|pc)$' > ${ID_VALUE}.install; then
echo "cmake install files are empty!"
fi
# qmake 安装
if ! grep -- "-install qinstall" install.log | awk '{print $NF}' | grep -vE '\.(h|cmake|pc)$' >> ${ID_VALUE}.install; then
echo "qmake install files are empty!"
fi
# 动态库软连接
if ! grep -- "^ln -f -s " install.log | awk '{print $NF}' >> ${ID_VALUE}.install; then
echo "Get library softlink empty!"
fi

# glib-compile-schemas 文件添加到 install 文件
for SCHEMAS in "${PREFIX}"/share/glib-2.0/schemas/gschema*; do
if [[ -f "$SCHEMAS" ]]; then
echo "$SCHEMAS" >> "${ID_VALUE}.install"
fi
done

# 获取依赖的所有文件
for LDFILE in "$@"; do

# 判断文件是否以 .so 结尾
if [[ "$LDFILE" == *.so ]]; then
FILE_PATH="${PREFIX}/lib/${TRIPLET}/$LDFILE"

# 添加依赖库到 install 文件
for SOFILE in "${PREFIX}/lib/${TRIPLET}"/${LDFILE}*; do
if [[ -f "$SOFILE" ]]; then
echo "$SOFILE" >> "${ID_VALUE}.install"
fi
done
else
FILE_PATH="${PREFIX}/bin/$LDFILE"
fi

# 获取依赖库
DEPENDENCIES=$(ldd "$FILE_PATH" | grep "$PREFIX") || continue
if [[ ! -z "$DEPENDENCIES" ]]; then
echo "$DEPENDENCIES" | while IFS= read -r line; do
LIB_PATH=${line##*=> }
LIB_PATH=${LIB_PATH%%(*}

# 获取基本库名并匹配相关库
LIB_DIR=$(dirname "$LIB_PATH")
BASE_LIB_NAME=$(basename "$LIB_PATH")

# 使用通配符查找相关库文件并将结果倒序存储到 install 文件
for FILE in "$LIB_DIR"/${BASE_LIB_NAME%.*}*; do
if [[ -f "$FILE" ]]; then
echo "$FILE"
fi
done | sort -r >> "${ID_VALUE}.install"

done
fi
done

# 排除静态链接库
#echo '^'${PREFIX}'/'${TRIPLET}'/.+(?<!\.a)$' >> "${ID_VALUE}.install"
#echo '^'${PREFIX}'/lib/.+(?<!\.a|\.pc|\.cmake|\.h|\.sh|\.prf|\.inc)$' >> "${ID_VALUE}.install"
14 changes: 12 additions & 2 deletions linglong.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: "1"
package:
id: org.deepin.fontmanager
name: "deepin-font-manager"
version: 6.5.0.1
version: 6.5.2.1
kind: app
description: |
font manager for deepin os.
Expand All @@ -25,6 +25,8 @@ build: |

# 获取版本号
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
# 使用sed命令替换version的值
sed -i "s/^ version: .*/ version: ${VERSION}.1/" linglong.yaml

cmake -B build ${conf_args} \
-DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \
Expand All @@ -34,7 +36,15 @@ build: |
-DVERSION=${VERSION}

cmake --build build -j`nproc`
cmake --build build --target install
cmake --build build --target install > install.log 2>&1

# 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
LDD_FILES=(
deepin-font-manager
)

# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"

sources:
# - kind: git
Expand Down
Loading