Files
spark-wine/spark-dwine-helper/build.sh
2022-06-18 19:11:53 +08:00

100 lines
2.3 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#/bin/bash
DEPEND=`dpkg -l | grep fakeroot`
if [ "$DEPEND" = "" ] ; then
echo "未安装依赖fakeroot 本脚本退出"
exit 1
fi
if [ $# -lt 1 ]; then
echo "无参数,无法启动。用法 $0 版本号"
echo "No option detected, exit. Usage: $0 version"
exit 1
fi
version="$1"
echo "build debian package"
mkdir -p pkg/DEBIAN
cp -r ./s-wine-helper pkg/opt
SIZE=`du -s ./pkg`
SIZE=`echo ${SIZE%%.*}`
cat << EOF >pkg/DEBIAN/control
Package: spark-dwine-helper
Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity:amd64, p7zip-full:amd64, fonts-noto-cjk,deepin-wine-helper(>=5.1)
Section: utils
Priority: extra
Multi-Arch: foreign
Replaces: store.spark-app.spark-dwine-helper(<<$version)
Homepage: https://gitee.com/deepin-community-store/spark-wine
Description: Spark Deepin Wine Helper
EOF
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
cd ..
echo "普通deb包已经准备好正在生成UOS deb包"
rm -rf pkg/
#########################################
mkdir -p pkg/DEBIAN
cp -r package-source/uos-assests/opt pkg/
cp -r s-wine-helper/* pkg/opt
cat << EOF >pkg/opt/apps/store.spark-app.spark-dwine-helper/info
{
"appid": "store.spark-app.spark-dwine-helper",
"name": "store.spark-app.spark-dwine-helper",
"version": "$version",
"arch": ["amd64,arm64,mipsel64,sw64"],
"permissions": {
"autostart": false,
"notification": false,
"trayicon": false,
"clipboard": false,
"account": false,
"bluetooth": false,
"camera": false,
"audio_record": false,
"installed_apps": false
}
}
EOF
SIZE=`du -s ./pkg`
SIZE=`echo ${SIZE%%.*}`
cat << EOF >pkg/DEBIAN/control
Package: store.spark-app.spark-dwine-helper
Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity:amd64, p7zip-full:amd64, fonts-noto-cjk,deepin-wine-helper(>=5.1)
Section: utils
Priority: extra
Provides: spark-dwine-helper(=$version)
Conflicts: spark-dwine-helper
Replaces: spark-dwine-helper(<<$version)
Multi-Arch: foreign
Homepage: https://gitee.com/deepin-community-store/spark-wine
Description: Spark Deepin Wine Helper
EOF
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
cd ..
echo "UOS deb包已经准备好"
rm -rf pkg/