From 141d42ef965d472468c3e2c5cfc1e1b4ed86e93f Mon Sep 17 00:00:00 2001 From: shenmo Date: Sat, 28 Mar 2026 04:46:07 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BE=9D=E8=B5=96dpkg-dev?= =?UTF-8?q?=EF=BC=8C=E5=85=BC=E5=AE=B9AOSC=20OS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenmo --- debian/control | 5 ++--- tool/spark-dstore-patch | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index 4f7a9f7c..74f5353b 100644 --- a/debian/control +++ b/debian/control @@ -29,11 +29,10 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, aria2, gnupg, zenity, - policykit-1 | pkexec, + policykit-1 | pkexec | polkit, libnotify-bin, - qtwayland5 | qt6-wayland, + qtwayland5 | qt6-wayland | qt-5, desktop-file-utils, - dpkg-dev, lsb-release, Description: Spark Store A community powered app store, based on DTK. diff --git a/tool/spark-dstore-patch b/tool/spark-dstore-patch index 06f073e9..9bff3dfb 100755 --- a/tool/spark-dstore-patch +++ b/tool/spark-dstore-patch @@ -88,7 +88,7 @@ done } function exec_link_clean(){ -# remove broken links in /usr/share + # remove broken links in /usr/share find /usr/share/applications -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /usr/share/icons -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & @@ -98,13 +98,32 @@ function exec_link_clean(){ find /usr/share/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /usr/share/help -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /usr/share/locale -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & - find /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/fcitx -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & + + # 根据 uname -m 确定 multiarch 目录名 + arch=$(uname -m) + case $arch in + x86_64) + multiarch="x86_64-linux-gnu" + ;; + aarch64) + multiarch="aarch64-linux-gnu" + ;; + loongarch64|loong64) + multiarch="loongarch64-linux-gnu" + ;; + *) + multiarch="" + ;; + esac + + if [ -n "$multiarch" ]; then + find "/usr/lib/$multiarch/fcitx" -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & + fi + find /usr/lib/mozilla/plugins -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /usr/share/polkit-1/actions -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /usr/share/fonts -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & find /etc/fonts/conf.d -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null & - - } function exec_uos_package_update(){ update-icon-caches /usr/share/icons/* > /dev/null 2>&1 &