feat: 支持打包时从 debian/changelog 自动获取构建版本号并写入关于窗口

修改 debian/rules 文件,configure 时 qmake 添加环境变量 BUILD_VERSION,用于 .pro 文件中获取构建版本号并设置宏定义,在关于窗口中显示

Log: 修改并整理 debian 构建文件夹;修改 .pro 文件,支持打包时自动获取构建版本号;添加 usr/share/dsg/org.deepin.dtkwidget.feature-display.json,用于控制版本特性窗口显示提醒
This commit is contained in:
zty199
2023-02-19 06:51:29 +08:00
parent 1332107642
commit 854caafd6b
15 changed files with 296 additions and 295 deletions

1
debian/changelog vendored
View File

@@ -5,6 +5,7 @@ spark-store (4.2.3~test2) stable; urgency=medium
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
spark-store (4.2.3~test1) stable; urgency=medium
* 修复因判断安装状态错误创建多个相同任务的bug

4
debian/control vendored
View File

@@ -20,9 +20,9 @@ Build-Depends:
qtwayland5-dev-tools,
gcc,
g++
Standards-Version: 3.0
Standard-Version: 4.0.0
Homepage: https://www.spark-app.store/
Package: spark-store
Architecture: any
Depends:${shlibs:Depends}, ${misc:Depends},

14
debian/rules vendored
View File

@@ -1,14 +1,14 @@
#!/usr/bin/make -f
export QT_SELECT=5
export QT_SELECT = qt5
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DH_AUTO_ARGS = --parallel --buildsystem=qmake
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_VERBOSE = 1
%:
dh $@ --parallel
@@ -18,20 +18,18 @@ override_dh_auto_clean:
override_dh_auto_configure:
mkdir -p $(CURDIR)/build
dh_auto_configure MAKEFLAGS=-j$(JOBS) -- spark-store-project.pro \
qmake BUILD_VERSION=$(DEB_VERSION_UPSTREAM) spark-store-project.pro \
-spec linux-g++ CONFIG+=qtquickcompiler \
-o $(CURDIR)/build/
override_dh_auto_build:
make -C $(CURDIR)/build -j$(JOBS)
make MAKEFLAGS="$(MAKEFLAGS)" -C $(CURDIR)/build
override_dh_auto_install:
make -C $(CURDIR)/build install \
INSTALL_ROOT=$(CURDIR)/debian/spark-store
# Ignore the dpkg-shlibdeps: warning (it uses none of the library's symbols)
# Qt Mutidedia lib will ref to network libraray.
override_dh_shlibdeps:

View File

@@ -2,20 +2,16 @@
case "$1" in
configure)
# Enable i386 arch
echo "Enabling i386 arch..."
dpkg --add-architecture i386
# Enable i386 arch
echo "Enable i386 arch..."
dpkg --add-architecture i386
# config for aptss
mkdir -p /etc/aptss/sources.list.d
ln -s -f /etc/apt/sources.list /etc/aptss/sources.list
# config for aptss
mkdir -p /etc/aptss/sources.list.d
ln -s -f /etc/apt/sources.list /etc/aptss/sources.list
# Remove the sources.list file
if [ -e /etc/apt/sources.list.d/sparkstore.list ];then
rm /etc/apt/sources.list.d/sparkstore.list
fi
# Remove the sources.list file
rm -f /etc/apt/sources.list.d/sparkstore.list
# Check if /usr/local/bin existed
mkdir -p /usr/local/bin
@@ -28,33 +24,29 @@ case "$1" in
ln -s -f /opt/durapps/spark-store/bin/ssaudit /usr/local/bin/ssaudit
ln -s -f /opt/durapps/spark-store/bin/spark-dstore-patch /usr/local/bin/spark-dstore-patch
ln -s -f /opt/durapps/spark-store/bin/aptss /usr/local/bin/ss-apt-fast
ln -s -f /opt/durapps/spark-store/bin/aptss /usr/bin/aptss
ln -s -f /opt/durapps/spark-store/bin/aptss /usr/bin/aptss
# Create symbol links for SSINSTALL
ln -s -f /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
# Compile sender module
echo "Compiling the Sender module..."
gcc -Wformat -Wformat-security -Werror=format-security /opt/durapps/spark-store/bin/ss-feedback/sender-d.sh.c -o /opt/durapps/spark-store/bin/ss-feedback/sender-d
# Install key
mkdir -p /tmp/spark-store-install/
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
gpg --dearmor /tmp/spark-store-install/spark-store.asc
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
# Run apt update to avoid users being fucked up by the non-exist dependency problem
# Now abandoned as aptss now run ssupdate everytime
#aptss ssupdate
# Start upgrade detect service
systemctl enable spark-update-notifier
service spark-update-notifier start
systemctl start spark-update-notifier
# Update certain caches
update-icon-caches /usr/share/icons/hicolor || true
@@ -63,12 +55,10 @@ case "$1" in
update-mime-database /usr/share/mime || true
# Send email for statistics
# /tmp/spark-store-install/feedback.sh
#/tmp/spark-store-install/feedback.sh
# Remove temp dir
rm -rf /tmp/spark-store-install
;;
triggered)

View File

@@ -1,48 +1,35 @@
#!/bin/sh
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
# Remove residual symbol links
rm /usr/local/bin/spark-store
rm /usr/local/bin/ssinstall
rm /usr/local/bin/ssaudit
rm /usr/local/bin/spark-dstore-patch
rm /usr/local/bin/ussinstall
rm /usr/local/bin/ussremove
rm /usr/local/bin/ss-apt-fast
rm /usr/bin/aptss
if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
# Remove residual symbol links
rm -f /usr/local/bin/spark-store
rm -f /usr/local/bin/ssinstall
rm -f /usr/local/bin/ssaudit
rm -f /usr/local/bin/spark-dstore-patch
rm -f /usr/local/bin/ussinstall
rm -f /usr/local/bin/ussremove
rm -f /usr/local/bin/ss-apt-fast
rm -f /usr/bin/aptss
rm -rf /etc/aptss/
rm -rf /etc/aptss/
# Remove Sender module
rm /opt/durapps/spark-store/bin/ss-feedback/sender-d
# Remove Sender module
rm -f /opt/durapps/spark-store/bin/ss-feedback/sender-d
# Remove residual symbol links to stop upgrade detect if exist
if [ -e /etc/xdg/autostart/spark-update-notifier.desktop ];then
rm /etc/xdg/autostart/spark-update-notifier.desktop
fi
# Remove residual symbol links to stop upgrade detect
rm -f /etc/xdg/autostart/spark-update-notifier.desktop
# Shutdown services
service spark-update-notifier stop
# Shutdown services
systemctl stop spark-update-notifier
# Stop update detect service
systemctl disable spark-update-notifier
# Stop update detect service
systemctl disable spark-update-notifier
# Clean the auto install polkit file if exist
if [ -f "/usr/share/polkit-1/actions/store.spark-app.ssinstall.policy" ] ; then
rm /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
fi
# 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
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
# Clean the auto install polkit file if exist
rm -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
# Remove gpg key file
rm -f /etc/apt/trusted.gpg.d/spark-store.gpg
apt-key del '9D9A A859 F750 24B1 A1EC E16E 0E41 D354 A29A 440C'
else
echo "非卸载操作,不进行配置清理"
echo "非卸载操作,不进行配置清理"
fi