Skip to content

Commit 93522cd

Browse files
authored
fix alpine issue for good
1 parent 3c80237 commit 93522cd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

make-appimage.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ export DEPLOY_GSTREAMER=1
1919
export DEPLOY_LOCALE=1
2020
export ANYLINUX_LIB=1
2121
export STARTUPWMCLASS=secrets # For Wayland, this is 'org.gnome.World.Secrets', so this needs to be changed in desktop file manually by the user in that case until some potential automatic fix exists for this
22+
export PATH_MAPPING='/sbin/ldconfig:${SHARUN_DIR}/bin/ldconfig'
2223

2324
# Deploy dependencies
2425
quick-sharun /usr/bin/secrets \
2526
/usr/lib/libgirepository* \
2627
/usr/lib/libusb* \
27-
/usr/lib/libcups*
28+
/usr/lib/libcups* \
29+
/sbin/ldconfig
2830

2931
# Patch secrets to use AppImage's directory
3032
sed -i '/from gsecrets import const/a \
@@ -34,5 +36,13 @@ LOCALEDIR = os.path.join(SHARUN_DIR, '"'"'share'"'"', '"'"'locale'"'"')' ./AppDi
3436
sed -i 's|const.PKGDATADIR|PKGDATADIR|' ./AppDir/bin/secrets
3537
sed -i 's|const.LOCALEDIR|LOCALEDIR|' ./AppDir/bin/secrets
3638

39+
sed -i -e 's|/etc/ld.so.cache|/tmp/ld.so.cache|g' ./AppDir/bin/ldconfig
40+
echo '#!/bin/sh
41+
if command -v ldconfig 1>/dev/null && [ ! -f /tmp/ld.so.cache ]; then
42+
exec ldconfig
43+
fi
44+
' > ./AppDir/bin/ldconfig.hook
45+
chmod +x ./AppDir/bin/ldconfig.hook
46+
3747
# Turn AppDir into AppImage
3848
quick-sharun --make-appimage

0 commit comments

Comments
 (0)