Update package-debian.sh

This commit is contained in:
JieXu 2026-02-26 10:02:22 +08:00 committed by GitHub
parent 61bb796b4d
commit 37f1017bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ cp -rf $OutputPath "${PackagePath}/opt/v2rayN"
echo "When this file exists, app will not store configs under this folder" > "${PackagePath}/opt/v2rayN/NotStoreConfigHere.txt" echo "When this file exists, app will not store configs under this folder" > "${PackagePath}/opt/v2rayN/NotStoreConfigHere.txt"
if [ $Arch = "linux-64" ]; then if [ $Arch = "linux-64" ]; then
Arch2="amd64" Arch2="amd64"
else else
Arch2="arm64" Arch2="arm64"
fi fi
@ -32,9 +32,8 @@ Depends: libc6 (>= 2.34), fontconfig (>= 2.13.1), desktop-file-utils (>= 0.26),
Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others
EOF EOF
cat >"${PackagePath}/DEBIAN/postinst" <<-EOF mkdir -p "${PackagePath}/usr/share/applications"
if [ ! -s /usr/share/applications/v2rayN.desktop ]; then cat >"${PackagePath}/usr/share/applications/v2rayN.desktop" <<-EOF
cat >/usr/share/applications/v2rayN.desktop<<-END
[Desktop Entry] [Desktop Entry]
Name=v2rayN Name=v2rayN
Comment=A GUI client for Windows and Linux, support Xray core and sing-box-core and others Comment=A GUI client for Windows and Linux, support Xray core and sing-box-core and others
@ -43,10 +42,12 @@ Icon=/opt/v2rayN/v2rayN.png
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Network;Application; Categories=Network;Application;
END EOF
fi
update-desktop-database cat >"${PackagePath}/DEBIAN/postinst" <<-'EOF'
set -e
update-desktop-database || true
exit 0
EOF EOF
sudo chmod 0755 "${PackagePath}/DEBIAN/postinst" sudo chmod 0755 "${PackagePath}/DEBIAN/postinst"