svn commit: r40828 - projects/xml-tools/share/mk
Gabor Kovesdan
gabor at FreeBSD.org
Wed Jan 30 16:37:00 UTC 2013
Author: gabor
Date: Wed Jan 30 16:36:59 2013
New Revision: 40828
URL: http://svnweb.freebsd.org/changeset/doc/40828
Log:
- Add support for epub generation
Modified:
projects/xml-tools/share/mk/doc.docbook.mk
Modified: projects/xml-tools/share/mk/doc.docbook.mk
==============================================================================
--- projects/xml-tools/share/mk/doc.docbook.mk Wed Jan 30 16:19:08 2013 (r40827)
+++ projects/xml-tools/share/mk/doc.docbook.mk Wed Jan 30 16:36:59 2013 (r40828)
@@ -152,6 +152,7 @@ COLLATEINDEX= ${PREFIX}/share/sgml/docbo
XSLTPROCFLAGS?= --nonet
XSLXHTML?= ${DOC_PREFIX}/share/xsl/freebsd-xhtml.xsl
XSLXHTMLCHUNK?= ${DOC_PREFIX}/share/xsl/freebsd-xhtml-chunk.xsl
+XSLEPUB?= ${DOC_PREFIX}/share/xsl/freebsd-epub.xsl
XSLFO?= ${DOC_PREFIX}/share/xsl/freebsd-fo.xsl
INDEXREPORTSCRIPT= ${DOC_PREFIX}/share/misc/indexreport.pl
@@ -349,6 +350,10 @@ CLEANFILES+= PLIST.${_curformat}
CLEANFILES+= $$([ -f HTML.manifest ] && ${XARGS} < HTML.manifest) \
HTML.manifest ln*.html
+.elif ${_cf} == "epub"
+CLEANFILES+= ${DOC}.epub mimetype
+CLEANDIRS+= META-INF OEBPS
+
.elif ${_cf} == "html.tar"
CLEANFILES+= ${DOC}.html
@@ -413,7 +418,7 @@ CLEANFILES+= ${LOCAL_CSS_SHEET}
_cf=${_curformat}
.for _curcomp in ${INSTALL_COMPRESSED}
-.if ${_cf} != "html-split" && ${_cf} != "html"
+.if ${_cf} != "html-split" && ${_cf} != "html" && ${_cf} != "epub"
_curinst+= install-${_curformat}.${_curcomp}
_docs+= ${DOC}.${_curformat}.${_curcomp}
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
@@ -503,6 +508,17 @@ ${DOC}.html.tar: ${DOC}.html ${LOCAL_IMA
${TAR} rf ${.TARGET} -C ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} ${_curimage:S|${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T}/||}
.endfor
+# EPUB -------------------------------------------------------------
+
+${DOC}.epub: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
+ ${CSS_SHEET}
+ ${XSLTPROC} ${XSLTPROCOPTS} ${XSLEPUB} ${DOC}.xml
+ ${ECHO} "application/epub+zip" > mimetype
+ ${CP} ${CSS_SHEET} OEBPS/
+ zip -0Xq ${DOC}.epub mimetype
+ zip -Xr9D ${DOC}.epub OEBPS META-INF
+
+
# TXT --------------------------------------------------------------------
.if !target(${DOC}.txt)
More information about the svn-doc-projects
mailing list