Skip to content

Commit dc3f319

Browse files
committed
Update release-linux-x86.yml
Update aarch-x86 job
1 parent 26f2f99 commit dc3f319

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/release-linux-x86.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,21 @@ jobs:
121121
set -e
122122
pacman -Syu --noconfirm
123123
pacman -S --noconfirm base-devel binutils fakeroot sudo dpkg
124-
mkdir -p /tmp/multimdreader-pkg/src
124+
125+
mkdir -p /tmp/multimdreader-pkg
125126
# Estrai il binario a 32-bit dal .deb (non esiste AppImage i686)
126127
DEB=$(find /artifacts/ -name "*.deb" | head -1)
127128
if [ -z "$DEB" ]; then echo "ERROR: No .deb found"; exit 1; fi
128129
dpkg-deb -x "$DEB" /tmp/extract
129130
BIN=$(find /tmp/extract -type f -path "*/bin/*" | head -1)
130131
if [ -z "$BIN" ]; then BIN=$(find /tmp/extract -type f -perm -111 ! -name "*.so*" | head -1); fi
131132
if [ -z "$BIN" ]; then echo "ERROR: No executable found inside .deb"; exit 1; fi
132-
cp "$BIN" /tmp/multimdreader-pkg/src/MultiMDReader
133-
chmod +x /tmp/multimdreader-pkg/src/MultiMDReader
134-
# File .desktop (attenzione: tutto indentato a 12 spazi, anche il terminatore)
135-
cat > /tmp/multimdreader-pkg/src/multimdreader.desktop << 'DESKTOPEOF'
133+
# Le sorgenti vanno nello STESSO folder del PKGBUILD (startdir/SRCDEST),
134+
# NON in src/ : makepkg le cerca qui e poi le copia da solo in srcdir.
135+
cp "$BIN" /tmp/multimdreader-pkg/MultiMDReader
136+
chmod +x /tmp/multimdreader-pkg/MultiMDReader
137+
138+
cat > /tmp/multimdreader-pkg/multimdreader.desktop << 'DESKTOPEOF'
136139
[Desktop Entry]
137140
Name=MultiMDReader
138141
Comment=Cross-Platform Markdown Reader
@@ -143,9 +146,11 @@ jobs:
143146
Categories=Office;TextEditor;Viewer;
144147
MimeType=text/markdown;text/x-markdown;
145148
DESKTOPEOF
149+
146150
TAG="${{ github.ref_name }}"
147151
VERSION="${TAG#v}"
148152
[ -z "$VERSION" ] || [ "$VERSION" = "$TAG" ] && VERSION="0.0.6"
153+
149154
cat > /tmp/multimdreader-pkg/PKGBUILD << 'PKGBUILDEOF'
150155
pkgname=multimdreader-bin
151156
pkgver=PLACEHOLDER
@@ -159,17 +164,22 @@ jobs:
159164
conflicts=('multimdreader')
160165
source=("MultiMDReader" "multimdreader.desktop")
161166
sha256sums=('SKIP' 'SKIP')
167+
162168
package() {
163169
install -Dm755 "$srcdir/MultiMDReader" "$pkgdir/usr/bin/multimdreader"
164170
install -Dm644 "$srcdir/multimdreader.desktop" "$pkgdir/usr/share/applications/multimdreader.desktop"
165171
}
166172
PKGBUILDEOF
173+
167174
sed -i "s/pkgver=PLACEHOLDER/pkgver=$VERSION/" /tmp/multimdreader-pkg/PKGBUILD
175+
168176
cd /tmp/multimdreader-pkg
169177
useradd -m builduser
170178
echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
171179
chown -R builduser:builduser /tmp/multimdreader-pkg
172-
su - builduser -c "cd /tmp/multimdreader-pkg && makepkg -sf --noconfirm --ignorearch"
180+
# -d (nodeps): salta controlli/scarico dipendenze (no download ~700MB).
181+
# Le dipendenze restano comunque nei metadati del pacchetto finale.
182+
su - builduser -c "cd /tmp/multimdreader-pkg && makepkg -d --noconfirm --ignorearch"
173183
find /tmp/multimdreader-pkg -name "*.pkg.tar.zst" -exec cp {} /artifacts/ \;
174184
175185
- name: Upload Arch x86 package

0 commit comments

Comments
 (0)