-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinglong.yaml
More file actions
55 lines (54 loc) · 2.18 KB
/
linglong.yaml
File metadata and controls
55 lines (54 loc) · 2.18 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
version: '1'
package:
id: io.github.zen-generic
name: Zen
version: 1.19.9.0426
kind: app
description: 'Experience tranquility while browsing the internet with Zen! Our mission
is to give you a perfect balance for speed, privacy and productivity
'
base: org.deepin.base/25.2.1
command:
- /opt/apps/io.github.zen-generic/files/bin/io.github.zen-generic
build: |
cd /project/linglong/sources
APPIMAGE=$(find . -regex '.*\.AppImage\|.*appimage' -exec basename {} \; | grep -E 'x86_64|amd64' | head -1)
if [ -z "$APPIMAGE" ]; then
APPIMAGE=$(find . -regex '.*\.AppImage\|.*appimage' -exec basename {} \; | head -1)
fi
echo "$APPIMAGE"
chmod +x ${APPIMAGE}
./${APPIMAGE} --appimage-extract
BINNAME=${LINGLONG_APPID}
APP_PREFIX=${BINNAME}
echo "#!/usr/bin/env bash" > ${BINNAME}
echo "unset LD_LIBRARY_PATH" >> ${BINNAME}
echo "cd ${PREFIX}/lib/${APP_PREFIX} && ./AppRun $@" >> ${BINNAME}
# only search for .desktop file in the squashfs-root directory
DESKTOP_FILE=$(find squashfs-root/ -maxdepth 1 -regex '.*\.desktop' -exec basename {} \;)
echo "$DESKTOP_FILE"
cp squashfs-root/${DESKTOP_FILE} .
sed -i "s@Exec=.*@Exec=${PREFIX}/bin/${BINNAME}@" ${DESKTOP_FILE}
cd squashfs-root
if [ ! $PREFIX ]; then
PREFIX=opt/${APP_PREFIX}
fi
DESTDIR=${dest_dir}
# install icons to linglong package
if [ -d usr/share/icons ]; then
cd usr
find share/icons -type f -exec install -D "{}" "${DESTDIR}/${PREFIX}/{}" \;
cd ..
fi
find -type d -exec install -d "${DESTDIR}/${PREFIX}/lib/${APP_PREFIX}/{}" \;
find -type f -exec install -D "{}" "${DESTDIR}/${PREFIX}/lib/${APP_PREFIX}/{}" \;
find -type l -exec bash -c "ln -s \$(readlink {}) "${DESTDIR}/${PREFIX}/lib/${APP_PREFIX}/{}" " -exec install -D "{}" "${DESTDIR}/${PREFIX}/lib/${APP_PREFIX}/{}" \;
cd ..
install -D ${BINNAME} ${DESTDIR}/${PREFIX}/bin/${BINNAME}
install -D ${DESKTOP_FILE} ${DESTDIR}/${PREFIX}/share/applications/${DESKTOP_FILE}
rm -rf squashfs-root
sources:
- kind: file
url: https://gh-proxy.org/https://github.com/zen-browser/desktop/releases/download/1.19.9b/zen-x86_64.AppImage
digest: c2b276305962e3d558880c50b4ca5e7f677b6deb9613a2b821e057445a6767ac
name: Zen.AppImage