mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Instead of splitting remove / exclusion of unwanted files in 2-3 places (`all` rule, `update` rule, and update script in some cases), install the same files in debug & release builds, and exclude unwanted stuff when generating the update. This should finally fix the CI issue with OCR tests (since we don't remove the `data/dict` & `data/tessdata` directories on release build anymore).
25 lines
1.0 KiB
Makefile
25 lines
1.0 KiB
Makefile
POCKETBOOK_DIR = $(PLATFORM_DIR)/pocketbook
|
|
PB_PACKAGE = koreader-pocketbook$(KODEDUG_SUFFIX)-$(VERSION).zip
|
|
PB_PACKAGE_OTA = koreader-pocketbook$(KODEDUG_SUFFIX)-$(VERSION).targz
|
|
|
|
define UPDATE_PATH_EXCLUDES +=
|
|
tools
|
|
endef
|
|
|
|
update: all
|
|
# ensure that the binaries were built for ARM
|
|
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM
|
|
# Pocketbook launching scripts
|
|
rm -rf $(INSTALL_DIR)/{applications,system}
|
|
mkdir -p $(INSTALL_DIR)/applications
|
|
mkdir -p $(INSTALL_DIR)/system/bin
|
|
$(SYMLINK) $(POCKETBOOK_DIR)/koreader.app $(INSTALL_DIR)/applications/
|
|
$(SYMLINK) $(POCKETBOOK_DIR)/system_koreader.app $(INSTALL_DIR)/system/bin/koreader.app
|
|
$(SYMLINK) $(COMMON_DIR)/spinning_zsync $(INSTALL_DIR)/koreader/
|
|
$(SYMLINK) $(INSTALL_DIR)/koreader $(INSTALL_DIR)/applications/
|
|
# Create packages.
|
|
$(strip $(call mkupdate,--manifest-transform=/^system/d;s/^/..\// $(PB_PACKAGE),applications/koreader)) applications system
|
|
$(strip $(call mkupdate,--manifest-transform=s/^/..\// $(PB_PACKAGE_OTA),applications/koreader)) applications
|
|
|
|
PHONY += update
|