From 2a6149520ca89bd365c41d75d12af510d22363fb Mon Sep 17 00:00:00 2001 From: Ced Date: Fri, 27 Oct 2023 12:07:01 +0100 Subject: [PATCH] Fix BW epub not opening in apple books The mime-type was not correct --- book/makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/book/makefile b/book/makefile index a819f1a..f7d1de7 100644 --- a/book/makefile +++ b/book/makefile @@ -45,7 +45,7 @@ images += $(foreach directory, $(chapters), $(wildcard $(directory)/*/*.jpg)) images += $(foreach directory, $(chapters), $(wildcard $(directory)/*.png)) images += $(foreach directory, $(chapters), $(wildcard $(directory)/*/*.png)) -# Black and White ebook, we will just re-zip directory after converting the +# Black and White ebook, we will just re-zip directory after converting the # images to lower resolution and greyscale bw_images := $(addprefix bw-book-epub/OEBPS/, $(images)) @@ -106,14 +106,11 @@ bw-book-epub/OEBPS/%.jpg: %.jpg bw-book-epub/OEBPS/%.png: %.png $(CONVERT_PIC) $< $(REDUCE_PIC) $@ -bw_ebook.zip: copy_ebook_files $(bw_images) - zip -qXr9D bw_ebook.zip bw-book-epub - -epub/bw_book.epub: bw_ebook.zip - mv bw_ebook.zip epub/bw_book.epub +epub/bw_book.epub: copy_ebook_files $(bw_images) + cd bw-book-epub; zip -q9XrD ../epub/bw_book.epub ./ bw_epub: epub/bw_book.epub | bw-book-epub - + # Now with the rules # Expected usual rules first .PHONY: all