Freeway Warrior (fw) 1 epub build. Font fixes. OFL Carlito font. CSS update for fw...
[project-aon.git] / common / epub / Makefile.common
index 73e205a..eda9023 100644 (file)
@@ -11,6 +11,7 @@ RELSCRIPT := $(AONROOTDIR)/common/scripts
 # Relative location of the xsl files
 RELXSLDIR := $(AONROOTDIR)/common/xsl
 EPUBSCRIPT := $(RELSCRIPT)/gbtoepub.pl
+COVERIMAGE := $(AONROOTDIR)/$(BLANG)/jpeg/$(SERIES)/$(BASENAME)/skins/ebook/cover.jpg
 
 EPUB=$(BASENAME).epub
 MOBI=$(BASENAME).mobi
@@ -39,12 +40,12 @@ XSLFILES=$(RELXSLDIR)/epub-opf-metadata.xsl $(RELXSLDIR)/epub-xhtml.xsl  \
 # Generate the ePub file from the XML file
 epub: $(EPUB)
 $(AONROOTDIR)/$(BLANG)/epub/$(SERIES)/$(BASENAME)/$(EPUB): $(XMLFILE) $(EPUBSCRIPT) $(XSLFILES)
-       cd $(AONROOTDIR) && perl $(EPUBSCRIPT) --language=$(BLANG) --font-files=$(AONROOTDIR)/fontfiles/ $(BASENAME) 
+       cd $(AONROOTDIR) && perl $(EPUBSCRIPT) --language=$(BLANG) --font-files=$(AONROOTDIR)/common/fonts/ $(BASENAME) 
 
 $(EPUB): $(AONROOTDIR)/$(BLANG)/epub/$(SERIES)/$(BASENAME)/$(EPUB)
        cp -p $(AONROOTDIR)/$(BLANG)/epub/$(SERIES)/$(BASENAME)/$(EPUB) .
-# Regenerate to include the covers properly within the Ebook
-       ebook-convert $(EPUB) regen_$(EPUB)
+# Regenerate to include the covers properly within the Ebook and fix the EPUB
+       ebook-convert $(EPUB) regen_$(EPUB) --cover $(COVERIMAGE)
        mv regen_$(EPUB) $(EPUB)
        -rm -f cover.jpg $(BASENAME).opf