mirror of
https://gitee.com/spark-store-project/uos-packaging-tools
synced 2025-12-19 05:21:41 +08:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd19756ff6 | |||
| c9837d0f89 | |||
| 258fd58459 | |||
| f958c6a046 | |||
| 73bf887b0a | |||
|
|
6d5d0f0b4c | ||
| eb4a0e119b | |||
| ce8a15fe0c | |||
| cc2d3e196d | |||
|
|
2372c42adf | ||
| 8cee037978 | |||
| f6071e356c | |||
| e8f10f2829 | |||
| db05041c57 | |||
| 835a4689bf | |||
|
|
25da17d5ec |
10
debian/changelog
vendored
10
debian/changelog
vendored
@@ -1,6 +1,10 @@
|
||||
uos-packaging-tools (1.6.0) UNRELEASED; urgency=low
|
||||
uos-packaging-tools (1.7.6) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release. Closes: #nnnn
|
||||
<nnnn is the bug number of your ITP>
|
||||
* 支持在 Debian 13 安装
|
||||
* 根据新 zenity 的样式修改了大小
|
||||
* 支持自动设置755权限
|
||||
* 支持 GXDE 25 GXFM
|
||||
* 新增自动添加安装大小的功能
|
||||
* 修复银河麒麟不支持显示图标的问题
|
||||
|
||||
-- shenmo <> Wed, 09 Apr 2025 18:42:51 +0800
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -12,7 +12,7 @@ Rules-Requires-Root: no
|
||||
Package: uos-packaging-tools
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends},libnotify-bin,fakeroot,zstd,policykit-1 | polkit,zenity,bash,ostree
|
||||
Depends: ${misc:Depends},libnotify-bin,fakeroot,zstd,policykit-1 | polkit | pkexec ,zenity,bash,ostree
|
||||
Description: auto-generated package by debmake
|
||||
This Debian binary package was auto-generated by the
|
||||
debmake(1) command provided by the debmake package.
|
||||
|
||||
@@ -24,7 +24,7 @@ function zenity()
|
||||
|
||||
confirm_installation() {
|
||||
local package_name=$(dpkg-deb -f "$1" Package)
|
||||
zenity --question --width=300 --height=150 --text="您正准备安装 ${package_name}\n\n若这次安装请求是您发起的,请按确定继续安装,否则请取消"
|
||||
zenity --question --width=300 --height=250 --text="您正准备安装 ${package_name}\n\n若这次安装请求是您发起的,请按确定继续安装,否则请取消"
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ if [ -e /usr/local/bin/ssaudit ]; then
|
||||
# 弹出确认窗口
|
||||
if confirm_installation "$DEBPATH"; then
|
||||
notify-send "正在使用 ssaudit 安装 $(dpkg-deb -f "$DEBPATH" Package),请稍候...." -i /usr/share/icons/uos-packaging-tools.png
|
||||
/usr/local/bin/ssaudit "$DEBPATH" | zenity --text-info --width=500 --height=300 --title="安装输出" --auto-scroll
|
||||
/usr/local/bin/ssaudit "$DEBPATH" | zenity --text-info --width=500 --height=500 --title="安装输出" --auto-scroll
|
||||
else
|
||||
notify-send "$(dpkg-deb -f "$DEBPATH" Package) 的安装已取消" -i /usr/share/icons/uos-packaging-tools.png
|
||||
fi
|
||||
@@ -54,7 +54,7 @@ else
|
||||
# 弹出确认窗口
|
||||
if confirm_installation "$DEBPATH"; then
|
||||
notify-send "正在使用 apt 安装 $(dpkg-deb -f "$DEBPATH" Package),请稍候...." -i /usr/share/icons/uos-packaging-tools.png
|
||||
apt install "$DEBPATH" --reinstall -y | zenity --text-info --width=500 --height=300 --title="安装输出" --auto-scroll
|
||||
apt install "$DEBPATH" --reinstall -y | zenity --text-info --width=500 --height=500 --title="安装输出" --auto-scroll
|
||||
if [ "$?" = "0" ]; then
|
||||
notify-send "$(dpkg-deb -f "$DEBPATH" Package) 安装已完成" -i /usr/share/icons/uos-packaging-tools.png
|
||||
else
|
||||
|
||||
@@ -12,6 +12,39 @@ else
|
||||
opt=`pwd`
|
||||
fi
|
||||
notify-send `basename $opt`开始打包 -i /usr/share/icons/uos-packaging-tools.png
|
||||
|
||||
echo "正在检查权限: $opt"
|
||||
# 增强权限检查逻辑
|
||||
non_755_files=$(find "$opt" -type f -not -perm 755 -o -type d -not -perm 755 2>/dev/null | wc -l)
|
||||
if [ $non_755_files -gt 0 ]; then
|
||||
echo "发现$non_755_files个文件/目录权限不是755,正在修改..."
|
||||
if chmod 755 -R "$opt" 2>/tmp/chmod_error.log; then
|
||||
echo "权限修改成功"
|
||||
else
|
||||
echo "权限修改失败"
|
||||
fi
|
||||
else
|
||||
echo "所有文件权限已经是755,无需修改"
|
||||
fi
|
||||
# 新增Installed-Size处理逻辑
|
||||
installed_size=$(du -sk "$opt" | awk '{print $1}')
|
||||
control_file="$opt/DEBIAN/control"
|
||||
if [ -f "$control_file" ]; then
|
||||
if grep -q "Installed-Size:" "$control_file"; then
|
||||
sed -i "s/Installed-Size:.*/Installed-Size: $installed_size/" "$control_file"
|
||||
else
|
||||
# 判断文件行数是否大于等于3
|
||||
if [ $(wc -l < "$control_file") -ge 3 ]; then
|
||||
sed -i "3iInstalled-Size: $installed_size" "$control_file"
|
||||
else
|
||||
sed -i "1iInstalled-Size: $installed_size" "$control_file"
|
||||
fi
|
||||
fi
|
||||
echo "已更新Installed-Size: ${installed_size}KB"
|
||||
else
|
||||
echo "警告: 未找到DEBIAN/control文件"
|
||||
fi
|
||||
|
||||
fakeroot dpkg-deb -Z xz -b $opt $opt/..
|
||||
notify-send `basename $opt`打包完成 -i /usr/share/icons/uos-packaging-tools.png
|
||||
exit
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Exec=/usr/bin/packdeb %F
|
||||
Name=Pack This Dir
|
||||
Name[zh_CN]=在此打包
|
||||
Icon=uos-packaging-tools
|
||||
Type=Application
|
||||
X-DFM-MenuTypes=SingleFile;SingleDir;MultiFileDirs;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Exec=/usr/bin/packdeb %p
|
||||
Name=Pack Here
|
||||
Icon=uos-packaging-tools
|
||||
Type=Application
|
||||
X-DFM-MenuTypes=EmptyArea;
|
||||
Terminal=true
|
||||
MimeType=inode/directory;
|
||||
NoDisplay=true
|
||||
Version=1.0
|
||||
X-DDE-FileManager-NotShowIn=Desktop
|
||||
@@ -0,0 +1 @@
|
||||
../../gxde-file-manager/oem-menuextensions/pack-here-empty-area.desktop
|
||||
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Exec=/usr/bin/packdeb %F
|
||||
Name=Pack This Dir
|
||||
Icon=uos-packaging-tools
|
||||
Type=Application
|
||||
X-DFM-MenuTypes=SingleDir;MultiFileDirs;
|
||||
Terminal=true
|
||||
MimeType=inode/directory;
|
||||
NoDisplay=true
|
||||
X-DDE-FileManager-PosNum=1
|
||||
@@ -0,0 +1 @@
|
||||
../../gxde-file-manager/oem-menuextensions/pack-this-dir.desktop
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Exec=/usr/bin/packdeb %p
|
||||
Name=Pack Here
|
||||
Name[zh_CN]=在此打包
|
||||
Icon=uos-packaging-tools
|
||||
Type=Application
|
||||
X-DFM-MenuTypes=EmptyArea;
|
||||
Terminal=true
|
||||
MimeType=inode/directory;
|
||||
NoDisplay=true
|
||||
Version=1.0
|
||||
X-DDE-FileManager-NotShowIn=Desktop
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Exec=/usr/bin/packdeb %F
|
||||
Name=Pack This Dir
|
||||
Name[zh_CN]=在此打包
|
||||
Icon=uos-packaging-tools
|
||||
Type=Application
|
||||
X-DFM-MenuTypes=SingleDir;MultiFileDirs;
|
||||
Terminal=true
|
||||
MimeType=inode/directory;
|
||||
NoDisplay=true
|
||||
X-DDE-FileManager-PosNum=1
|
||||
1
src/usr/share/icons/hicolor/48x48/apps/uos-packaging-tools.png
Symbolic link
1
src/usr/share/icons/hicolor/48x48/apps/uos-packaging-tools.png
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../uos-packaging-tools.png
|
||||
Reference in New Issue
Block a user