chore: 修改 postinst / prerm 脚本

隐藏 asc key 文件下载过程;asc 文件转为 gpg 文件直接放入 /etc/apt/trusted.gpg.d 文件夹生效;隐藏 apt update 输出日志

Log: 修改 postinst / prerm 脚本;修改 copyright 文件
This commit is contained in:
zty199 2022-02-04 21:11:47 +08:00
parent 45e1970186
commit 3bfc183c89
3 changed files with 29 additions and 14 deletions

2
debian/copyright vendored

@ -3,7 +3,7 @@ Upstream-Name: spark-store
Source: https://gitee.com/deepin-community-store/spark-store
Files: *
Copyright: yzzi
Copyright: shenmo
License: GPL-3+
This package is free software; you can redistribute it and/or modify

@ -12,13 +12,13 @@ case "$1" in
ln -s -f /opt/durapps/spark-store/bin/ssinstall /usr/local/bin/ssinstall
ln -s -f /opt/durapps/spark-store/bin/spark-dstore-patch /usr/local/bin/spark-dstore-patch
# Download and install
cd /tmp/spark-store-install
wget https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc
apt-key add dcs-repo.gpg-key.asc
# Download and install key
nohup wget -O /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc > /dev/null 2>&1
nohup gpg --dearmor /tmp/spark-store-install/spark-store.asc > /dev/null 2>&1
cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg
# Run apt update to avoid users being fucked up by the non-exist dependency problem
apt update &
# Run apt update to avoid users being fucked up by the non-exist dependency problem
nohup apt update > /dev/null 2>&1 &
# Update certain caches
update-icon-caches /usr/share/icons/hicolor || true
@ -28,16 +28,24 @@ case "$1" in
# Send email for statistics
# /tmp/spark-store-install/feedback.sh
# Remove temp dir
rm -rf /tmp/spark-store-install
;;
triggered)
# Trigger for UOS debs installation
if [ -f "/usr/bin/deepin-app-store-tool" ]; then
exit 0
fi
echo '--------检测到Uniontech标准软件包运行补丁以修正安装--------'
/usr/local/bin/spark-dstore-patch
echo '-----------spark-dstore-patch补丁工具已运行完毕-----------'
# Quit if deepin-app-store-tool existed
if [ -x "/usr/bin/deepin-app-store-tool" ] ; then
exit 0
fi
# Trigger for UOS debs installation
echo '--------检测到Uniontech标准软件包运行补丁以修正安装--------'
if [ -x "/usr/local/bin/spark-dstore-patch" ] ; then
/usr/local/bin/spark-dstore-patch
echo '-----------spark-dstore-patch补丁工具已运行完毕-----------'
else
echo '------------spark-dstore-patch补丁工具运行失败------------'
fi
;;
esac

@ -6,3 +6,10 @@ rm /usr/local/bin/ssinstall
rm /usr/local/bin/spark-dstore-patch
rm /usr/local/bin/ussinstall
rm /usr/local/bin/ussremove
# Remove gpg key file
if [ -f "/etc/apt/trusted.gpg.d/spark-store.gpg" ] ; then
rm /etc/apt/trusted.gpg.d/spark-store.gpg
fi
nohup apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C' > /dev/null 2>&1 &