Artem Zolochevskiy c508451bd4 5.0-alt2
- completely rewritten (thanks Andrey Cherepanov)
- add %_defaultdocdir/documentation dir (used in indexhtml packages)
- add conflicts to other 'docs' packages
2009-10-22 09:15:39 +03:00

45 lines
1.3 KiB
Makefile

PROJECT = office-server
TOPLEVEL_DOC = index.txt
HTMLPAGE = $(TOPLEVEL_DOC:.txt=.html)
docdir = /usr/local/share/doc/$(PROJECT)
DESTDIR =
A2X = a2x
INSTALL = install
INSTALL_DATA = $(INSTALL) -m 644
.PHONY: all install clean
all: $(HTMLPAGE)
%.html: %.txt
$(A2X) -d book -f xhtml -a lang=ru \
--icons -r /etc/asciidoc/ -r ./ \
--xsltproc-opts='--stringparam toc.max.depth 2' \
$<
chunked: $(TOPLEVEL_DOC)
$(A2X) -d book -f chunked -a lang=ru \
--icons -r /etc/asciidoc/ -r ./ \
--xsltproc-opts='--stringparam toc.max.depth 2' \
$<
pdf: $(TOPLEVEL_DOC)
$(A2X) --fop --fop-opts='-c fop.xconf' -d book -f pdf -a lang=ru \
--xsltproc-opts='--stringparam toc.max.depth 2' \
--xsltproc-opts='--stringparam title.font.family "Liberation Sans"' \
--xsltproc-opts='--stringparam body.font.family "Liberation Sans"' \
--xsltproc-opts='--stringparam monospace.font.family "Liberation Mono"' \
$<
install: all
$(INSTALL_DATA) -D $(HTMLPAGE) $(DESTDIR)$(docdir)/$(HTMLPAGE)
$(INSTALL) -d $(DESTDIR)$(docdir)/images/icons
$(INSTALL_DATA) -D docbook-xsl.css $(DESTDIR)$(docdir)/
$(INSTALL_DATA) -D images/*.png $(DESTDIR)$(docdir)/images/
$(INSTALL_DATA) -D images/icons/* $(DESTDIR)$(docdir)/images/icons/
clean:
$(RM) -r index.xml $(HTMLPAGE) docbook-xsl.css images index.chunked index.fo index.pdf *~