1
# automake doesn't play nicely with DocBook :(
6
MANPAGE=aptitude.$(LANGCODE).8
7
# How much of the manual should actually at least be translated.
8
PERCENT_TRANSLATED=0 # status: 0.75%
9
MANPAGE_PERCENT_TRANSLATED=0 # status: 31%
10
README=README.$(LANGCODE)
11
XMLSOURCES=aptitude.xml manpage.xml $(srcdir)/../aptitude-common.xsl
13
HTML2TEXT=$(srcdir)/../html-to-text
15
# Put documentation in /usr/share/doc/aptitude (by default)
16
docdir=$(datadir)/doc/$(PACKAGE)
17
localemandir=$(mandir)/$(LANGCODE)
18
htmldir=$(docdir)/html/$(LANGCODE)
20
IMAGES = $(wildcard $(srcdir)/images/*.png)
25
-rm -fr output-html/ output-txt/ output-man/
26
-rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp
27
-rm -fr $(MANPAGE) $(README) *.tmp
28
-rm -fr aptitude.xml manpage.xml
31
$(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
32
$(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
33
$(mkinstalldirs) $(DESTDIR)$(htmldir)/images
34
$(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir)
35
$(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images
37
$(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE)
39
doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
42
aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
43
po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml
45
manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
46
po4a-translate -k $(MANPAGE_PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/manpage.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l manpage.xml
48
$(MANPAGE): $(XMLSOURCES) $(srcdir)/../aptitude-man.xsl
49
-rm -fr output-man $(MANPAGE)
50
xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml
51
mv output-man/aptitude.8 $(MANPAGE)
53
$(README): $(XMLSOURCES) $(srcdir)/../aptitude-txt.xsl
55
xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml
56
$(HTML2TEXT) output-txt/index.html > $(README)
58
doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css
59
rm -f output-html/aptitude.css
60
cp $(srcdir)/../aptitude.css output-html/
63
doc-html-stamp: $(XMLSOURCES) $(srcdir)/../aptitude-html.xsl $(IMAGES)
66
xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml
68
mkdir output-html/images/
69
ln -f $(srcdir)/images/*.png output-html/images/
70
set -e; for x in $(srcdir)/images/*.svg; do rsvg-convert -f png -o output-html/images/$$(basename $${x%.svg}.png) $$x; done
71
for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
72
for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
6
include $(top_srcdir)/buildlib/doc.mk
7
include $(top_srcdir)/buildlib/po4a.mk
10
README_encoding = utf-8
12
IMAGES := $(wildcard $(srcdir)/images/*.png) $(PO4A_IMAGES)
14
DOCBOOK_TARGETS = docbook-man docbook-html docbook-readme
16
include $(top_srcdir)/buildlib/docbook.mk
18
all-local: docbook-stamp
21
notrans_man_MANS = aptitude-create-state-bundle.1 aptitude-run-state-bundle.1