-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathlinglong.yaml
More file actions
69 lines (57 loc) · 2.2 KB
/
linglong.yaml
File metadata and controls
69 lines (57 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: GPL-3.0-or-later
version: '1'
package:
id: org.deepin.draw
name: deepin-draw
version: 6.5.38.1
kind: app
description: |
Draw for deepin os.
command:
- deepin-draw
base: org.deepin.base/25.2.2
runtime: org.deepin.runtime.dtk/25.2.2
build: |
# 下载和安装依赖
apt -y install --download-only qt6-base-dev libexif-dev libraw-dev libqt6opengl6 libdtk6gui-dev qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools libdtk6widget-dev libdtk6gui-dev libdtk6core-dev libxcb-util0-dev libdtk6core-bin libgtest-dev libgmock-dev kimageformat6-plugins deepin-event-log
bash ./install_dep /var/cache/apt/archives "$PREFIX"
# 修改服务使用玲珑启动
sed -i "s|Exec=/usr/bin/deepin-draw|Exec=deepin-draw|g" com.deepin.Draw.service
# 准备插件
mkdir -p $PREFIX/bin/imageformats
cp ${PREFIX}/lib/${TRIPLET}/qt6/plugins/imageformats/*.so $PREFIX/bin/imageformats
VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET} \
-DVERSION=${VERSION}
cmake --build build -j`nproc`
cmake --build build --target install >install.log 2>&1
# 项目生成应用名和动态隐式加载的依赖库,ldd无法找到的其他库
LDD_FILES=(
deepin-draw
../libdeepin-event-log.so
../../bin/imageformats/kimg_avif.so
../../bin/imageformats/kimg_heif.so
# plugins for libheif.so.1
libheif/plugins/libheif-aomenc.so
libheif/plugins/libheif-dav1d.so
libheif/plugins/libheif-j2kdec.so
libheif/plugins/libheif-libde265.so
libheif/plugins/libheif-x265.so
)
# 生成.install 文件
bash ./deploy_dep "${LDD_FILES[@]}"
ID_VALUE=$(awk -F ': ' '/^ id: / {print $2}' linglong.yaml)
# set LIBHEIF_PLUGIN_PATH for libheif.so.1 to load plugins
mkdir -p $PREFIX/etc
echo export LIBHEIF_PLUGIN_PATH=$PREFIX/lib/${TRIPLET}/libheif/plugins > $PREFIX/etc/profile
echo $PREFIX/etc/profile >> "${ID_VALUE}.install"
# allow apt download in build and do apt update
buildext:
apt:
build_depends:
- libc6