Remove DEB desktop integration fix from build workflow

Deleted post-processing steps that manually fixed desktop entry and icon placement in DEB packages after conversion from RPM. This streamlines the build process and removes custom extraction and repackaging logic.
This commit is contained in:
Your Name
2025-09-02 20:09:14 +03:00
parent 1b552c4ae8
commit 09d117cb53
-93
View File
@@ -199,99 +199,6 @@ jobs:
# Build DEB (via alien from RPM)
python setup_cxfreeze.py bdist_deb || echo "bdist_deb completed with warnings (alien)"
# Fix DEB desktop integration (alien sometimes misses this)
deb_file=$(ls dist/ytsage_*.deb 2>/dev/null | head -n1 || true)
if [ -n "$deb_file" ]; then
echo "Fixing DEB desktop integration for: $deb_file"
# Create temporary directory for DEB extraction
temp_deb_dir=$(mktemp -d)
cd "$temp_deb_dir"
# Extract the DEB package
ar x "$GITHUB_WORKSPACE/$deb_file"
# List extracted files to see what we have
echo "Extracted DEB contents:"
ls -la
# Find the data archive (could be data.tar.xz, data.tar.gz, data.tar.zst, etc.)
data_archive=""
for ext in xz gz zst; do
if [ -f "data.tar.$ext" ]; then
data_archive="data.tar.$ext"
break
fi
done
if [ -z "$data_archive" ]; then
echo "Warning: Could not find data archive in DEB package"
cd "$GITHUB_WORKSPACE"
rm -rf "$temp_deb_dir"
else
echo "Found data archive: $data_archive"
# Extract the data archive
mkdir -p data
cd data
case "$data_archive" in
*.tar.xz)
tar xf "../$data_archive"
;;
*.tar.gz)
tar xzf "../$data_archive"
;;
*.tar.zst)
tar --zstd -xf "../$data_archive"
;;
esac
# Ensure desktop files are properly placed
if [ ! -d "usr/share/applications" ]; then
mkdir -p usr/share/applications
fi
if [ ! -d "usr/share/pixmaps" ]; then
mkdir -p usr/share/pixmaps
fi
# Copy desktop entry if it exists in the package but not in the right place
if [ -f "usr/lib/ytsage-${version}/share/applications/ytsage.desktop" ] && [ ! -f "usr/share/applications/ytsage.desktop" ]; then
cp "usr/lib/ytsage-${version}/share/applications/ytsage.desktop" "usr/share/applications/"
echo "Copied desktop entry to proper location"
fi
# Copy icon if it exists in the package but not in the right place
if [ -f "usr/lib/ytsage-${version}/share/pixmaps/ytsage.png" ] && [ ! -f "usr/share/pixmaps/ytsage.png" ]; then
cp "usr/lib/ytsage-${version}/share/pixmaps/ytsage.png" "usr/share/pixmaps/"
echo "Copied icon to proper location"
fi
# Repackage the data archive with the same compression
case "$data_archive" in
*.tar.xz)
tar cJf "../$data_archive" ./*
;;
*.tar.gz)
tar czf "../$data_archive" ./*
;;
*.tar.zst)
tar --zstd -cf "../$data_archive" ./*
;;
esac
cd ..
# Create the fixed DEB package
ar r "${GITHUB_WORKSPACE}/${deb_file}" debian-binary control.tar.* "$data_archive"
# Clean up
cd "$GITHUB_WORKSPACE"
rm -rf "$temp_deb_dir"
echo "DEB package desktop integration fixed"
fi
fi
echo "Post-build directory listing:"
echo "-- dist --"; ls -lah dist || true
echo "-- build --"; ls -lah build || true