From 5535bdc3ef90fb05e637d81df6a977bc4cac9395 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 11 Apr 2024 17:57:55 +0200 Subject: [PATCH] make: improve `appimageupdate` rule Instead of trying to detect if running under Docker, use a simpler wildcard check to detect if FUSE support is available. This as the advantage of supporting Docker, rootless Docker, and Podman. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 283cd6738..5fa0d645d 100644 --- a/Makefile +++ b/Makefile @@ -70,8 +70,8 @@ WIN32_DIR=$(PLATFORM_DIR)/win32 APPIMAGETOOL=appimagetool-x86_64.AppImage APPIMAGETOOL_URL=https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage -# set to 1 if in Docker -DOCKER:=$(shell grep -q docker /proc/1/cgroup 2>/dev/null && echo 1) +# Is fuse support available? +USE_FUSE ?= $(wildcard /dev/fuse) # files to link from main directory INSTALL_FILES=reader.lua setupkoenv.lua frontend resources defaults.lua datastorage.lua \ @@ -342,7 +342,7 @@ ifeq ("$(wildcard $(APPIMAGETOOL))","") wget "$(APPIMAGETOOL_URL)" chmod a+x "$(APPIMAGETOOL)" endif -ifeq ($(DOCKER), 1) +ifeq ($(USE_FUSE),) # remove previously extracted appimagetool, if any rm -rf squashfs-root ./$(APPIMAGETOOL) --appimage-extract @@ -356,7 +356,7 @@ endif # generate AppImage cd $(INSTALL_DIR)/tmp && \ - ARCH=x86_64 ../../$(if $(DOCKER),squashfs-root/AppRun,$(APPIMAGETOOL)) koreader && \ + ARCH=x86_64 ../../$(if $(USE_FUSE),$(APPIMAGETOOL),squashfs-root/AppRun) koreader && \ mv *.AppImage ../../koreader-$(DIST)-$(MACHINE)-$(VERSION).AppImage androidupdate: all