summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-05-30 11:57:09 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-05-30 11:57:09 +0800
commitc170cbc7081230155d0f41039f3b2267be5e4fe5 (patch)
tree7948d4a6c42f678fda818903e239fc8fe79b7e2a
parentb4e2e2c590ab4ed1b52fee9c86f9e44473825901 (diff)
downloadaptitude-c170cbc7081230155d0f41039f3b2267be5e4fe5.tar.gz
Remove redundancy in doc build system
Lots of code was duplicated between makefiles for the various translations. Much of this is now in common rules files making it easier to add new translations. Translations that use po4a and provide full documentation have been updated to use the new includes. Some work is still required to make this compatible with the non-po4a and partial translations. * doc/common.mk: - common rules for doc makefiles * doc/po4a.mk: - common rules for po4a makefiles * doc/po4a/po4a.cfg: - new po files are picked up automatically - translate also safety-cost-level-diagram.svg * doc/po4a/Makefile.am: - update-po only updates the po files * doc/po4a/po/Makefile.am: - include aptitude.pot in dist files * doc/{es,fr,it}/Makefile.am: - use common rules
-rw-r--r--.gitignore15
-rw-r--r--NEWS8
-rw-r--r--doc/Makefile.am18
-rw-r--r--doc/common.mk69
-rw-r--r--doc/es/Makefile.am74
-rw-r--r--doc/es/images/Makefile.am2
-rw-r--r--doc/es/images/search-tier-diagram.svg358
-rw-r--r--doc/fr/Makefile.am78
-rwxr-xr-xdoc/fr/fixman5
-rw-r--r--doc/it/Makefile.am78
-rw-r--r--doc/po4a.mk21
-rw-r--r--doc/po4a/po/Makefile.am2
-rw-r--r--doc/po4a/po4a.cfg28
13 files changed, 160 insertions, 596 deletions
diff --git a/.gitignore b/.gitignore
index 19683d8c..27ddf375 100644
--- a/.gitignore
+++ b/.gitignore
@@ -115,6 +115,21 @@ doc/fr/manpage.xml
doc/fr/output-html/
doc/fr/output-man/
doc/fr/output-txt/
+doc/it/Makefile
+doc/it/Makefile.in
+doc/it/README.it
+doc/it/aptitude.it.8
+doc/it/aptitude.it.8.tmp
+doc/it/aptitude.xml
+doc/it/doc-css-stamp
+doc/it/doc-html-stamp
+doc/it/doc-stamp
+doc/it/images/Makefile
+doc/it/images/Makefile.in
+doc/it/manpage.xml
+doc/it/output-html/
+doc/it/output-man/
+doc/it/output-txt/
doc/ja/Makefile
doc/ja/Makefile.in
doc/ja/README.ja
diff --git a/NEWS b/NEWS
index 7c1e19a5..38e79ac0 100644
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,14 @@ earlier releases.
* [curses]: Update package views after 'Cancel pending actions'
(Closes: #595753)
+- Build system changes:
+
+ * Remove redundancy in doc build system
+
+ Lots of code was duplicated between makefiles for the
+ various translations. Much of this is now in common
+ rules files making it easier to add new translations.
+
- Documentation:
* [doc]: Add doctype headers to html docs.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d901fbf7..22de1536 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,13 +2,17 @@ SUBDIRS=cs de en es fi fr it ja pl po4a
EXTRA_DIST=aptitude-common.xsl aptitude-html.xsl aptitude-man.xsl aptitude-txt.xsl aptitude.css fixup-text html-to-text
-if USE_PO4A
+PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \
+ "$(top_srcdir)/doc/po4a/po4a.cfg"
-dist distdir: po4a-dist
+dist distdir: update-po
-update-po: po4a-dist
+update-po:
+ if [ -n "$(PO4A)" ]; then \
+ $(PO4A) \
+ --no-translations \
+ "--package-name=$(PACKAGE)" "--package-version=$(VERSION)" \
+ $(PO4AFLAGS); \
+ fi
-po4a-dist:
- -@cd $(srcdir) && po4a -M utf-8 -k 0 po4a/po4a.cfg
-
-endif
+.PHONY: update-po
diff --git a/doc/common.mk b/doc/common.mk
new file mode 100644
index 00000000..b78ca753
--- /dev/null
+++ b/doc/common.mk
@@ -0,0 +1,69 @@
+MANPAGE=aptitude.$(LANGCODE).8
+README=README.$(LANGCODE)
+
+HTML2TEXT=$(top_srcdir)/doc/html-to-text
+
+# Put documentation in /usr/share/doc/aptitude (by default)
+localemandir=$(mandir)/$(LANGCODE)
+htmldir=$(docdir)/html/$(LANGCODE)
+
+images/%.png: images/%.svg
+ rsvg-convert -x 1.5 -y 1.5 -f png -o $@ $<
+
+all-local: doc-stamp
+
+clean-local:
+ -rm -fr output-html/ output-txt/ output-man/
+ -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp
+ -rm -fr $(MANPAGE) $(README) *.tmp
+
+doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
+ touch doc-stamp
+
+install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
+ $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
+
+ $(mkinstalldirs) $(DESTDIR)$(htmldir)/images
+ $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir)
+ $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images
+
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ $(INSTALL_DATA) $(README) $(DESTDIR)$(pkgdatadir)
+
+$(MANPAGE): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-man.xsl
+ -rm -fr output-man $(MANPAGE)
+ xsltproc -o output-man/aptitude.8 $(top_srcdir)/doc/aptitude-man.xsl aptitude.xml
+ mv output-man/aptitude.8 $(MANPAGE)
+
+ if [ -x "$(srcdir)/fixman" ]; then \
+ "$(srcdir)/fixman"; \
+ fi
+
+$(README): $(XMLSOURCES) $(top_srcdir)/doc/aptitude-txt.xsl
+ -rm -fr output-txt/
+ xsltproc -o output-txt/index.html $(top_srcdir)/doc/aptitude-txt.xsl aptitude.xml
+ $(HTML2TEXT) output-txt/index.html > $(README)
+
+doc-css-stamp: doc-html-stamp $(top_srcdir)/doc/aptitude.css
+ rm -f output-html/aptitude.css
+ cp $(top_srcdir)/doc/aptitude.css output-html/
+ touch doc-css-stamp
+
+doc-html-stamp: $(XMLSOURCES) $(top_srcdir)/doc/aptitude-html.xsl $(IMAGES)
+ -rm -fr output-html/
+
+ xsltproc -o output-html/ $(top_srcdir)/doc/aptitude-html.xsl aptitude.xml
+
+ mkdir output-html/images/
+ ln -f $(srcdir)/images/*.png output-html/images/
+ for x in caution important note tip warning; do \
+ ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png \
+ output-html/images/; \
+ done
+ for x in home next prev up; do \
+ ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif \
+ output-html/images/; \
+ done
+
+ touch doc-html-stamp
diff --git a/doc/es/Makefile.am b/doc/es/Makefile.am
index 7be19a84..89451b50 100644
--- a/doc/es/Makefile.am
+++ b/doc/es/Makefile.am
@@ -1,74 +1,12 @@
# automake doesn't play nicely with DocBook :(
-SUBDIRS=images
+include $(top_srcdir)/doc/common.mk
+include $(top_srcdir)/doc/po4a.mk
+SUBDIRS=images
+EXTRA_DIST=
LANGCODE=es
-MANPAGE=aptitude.$(LANGCODE).8
-# How much of the manual should actually at least be translated.
-PERCENT_TRANSLATED=0 # status: 0.75%
-MANPAGE_PERCENT_TRANSLATED=0 # status: 31%
-README=README.$(LANGCODE)
-XMLSOURCES=aptitude.xml manpage.xml $(srcdir)/../aptitude-common.xsl
-
-HTML2TEXT=$(srcdir)/../html-to-text
-
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-localemandir=$(mandir)/$(LANGCODE)
-htmldir=$(docdir)/html/$(LANGCODE)
-
-IMAGES = $(wildcard $(srcdir)/images/*.png)
-
-all-local: doc-stamp
-
-clean-local:
- -rm -fr output-html/ output-txt/ output-man/
- -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp
- -rm -fr $(MANPAGE) $(README) *.tmp
- -rm -fr aptitude.xml manpage.xml
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
- $(mkinstalldirs) $(DESTDIR)$(htmldir)/images
- $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(htmldir)
- $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(htmldir)/images
-
- $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE)
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
- touch doc-stamp
-
-aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
- po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml
-
-manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
- 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
-
-$(MANPAGE): $(XMLSOURCES) $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man $(MANPAGE)
- xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml
- mv output-man/aptitude.8 $(MANPAGE)
-
-$(README): $(XMLSOURCES) $(srcdir)/../aptitude-txt.xsl
- -rm -fr output-txt
- xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml
- $(HTML2TEXT) output-txt/index.html > $(README)
-
-doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css
- rm -f output-html/aptitude.css
- cp $(srcdir)/../aptitude.css output-html/
- touch doc-css-stamp
-
-doc-html-stamp: $(XMLSOURCES) $(srcdir)/../aptitude-html.xsl $(IMAGES)
- -rm -fr output-html/
-
- xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml
- mkdir output-html/images/
- ln -f $(srcdir)/images/*.png output-html/images/
- set -e; for x in $(srcdir)/images/*.svg; do rsvg-convert -f png -o output-html/images/$$(basename $${x%.svg}.png) $$x; done
- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
+XMLSOURCES=aptitude.xml manpage.xml
- touch doc-html-stamp
+IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
diff --git a/doc/es/images/Makefile.am b/doc/es/images/Makefile.am
index 8dc4a5b7..3e5dcb54 100644
--- a/doc/es/images/Makefile.am
+++ b/doc/es/images/Makefile.am
@@ -5,7 +5,7 @@ EXTRA_DIST=become-root-snapshot.png broken-snapshot.png \
limit-snapshot.png menu-snapshot.png mine-snapshot2.png \
mine-snapshot3.png mine-snapshot4.png mine-snapshot5.png \
mine-snapshot.png preview-snapshot.png search-snapshot.png \
- search-tier-diagram.svg solution-explanation-snapshot.png \
+ solution-explanation-snapshot.png \
solution-reject-and-approve-snapshot.png \
solution-screen-snapshot2.png solution-screen-snapshot3.png \
solution-screen-snapshot4.png solution-screen-snapshot5.png \
diff --git a/doc/es/images/search-tier-diagram.svg b/doc/es/images/search-tier-diagram.svg
deleted file mode 100644
index f473318f..00000000
--- a/doc/es/images/search-tier-diagram.svg
+++ /dev/null
@@ -1,358 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="667.85712"
- height="502.23651"
- id="svg2509"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- sodipodi:docname="search-tier-diagram.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs2511">
- <linearGradient
- id="linearGradient3363">
- <stop
- style="stop-color:#f2ff15;stop-opacity:1;"
- offset="0"
- id="stop3365" />
- <stop
- style="stop-color:#ffffff;stop-opacity:1;"
- offset="1"
- id="stop3367" />
- </linearGradient>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective2517" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3363"
- id="linearGradient3448"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7419362,0,0,1.0003153,69.973232,-45.151301)"
- x1="407.14285"
- y1="309.75659"
- x2="407.14285"
- y2="699.06531" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="382.34238"
- inkscape:cy="611.15224"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:window-width="1918"
- inkscape:window-height="1148"
- inkscape:window-x="0"
- inkscape:window-y="25" />
- <metadata
- id="metadata2514">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-46.261524,-290.62567)">
- <g
- id="g3393"
- transform="translate(-10.095614,77.142857)">
- <path
- sodipodi:nodetypes="cc"
- id="path3373"
- d="M 60,575.21933 C 291.50885,482.18073 495.63028,483.51673 704.28571,575.21933"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <text
- id="text3377"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><textPath
- id="textPath3390"
- startOffset="50%"
- xlink:href="#path3373"><tspan
- dx="-323.57169"
- dy="-4.2857141"
- id="tspan3379">Tier 10,000: &quot;safe&quot; changes</tspan></textPath></text>
- </g>
- <g
- transform="translate(-10.095614,6.0714272)"
- id="g3399">
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 60,575.21933 C 291.50885,482.18073 495.63028,483.51673 704.28571,575.21933"
- id="path3401"
- sodipodi:nodetypes="cc" />
- <text
- xml:space="preserve"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- id="text3403"><textPath
- xlink:href="#path3373"
- startOffset="50%"
- id="textPath3405"><tspan
- id="tspan3407"
- dy="-4.2857141"
- dx="-323.57169">Tier 20,000: cancel everything</tspan></textPath></text>
- </g>
- <g
- id="g3409"
- transform="translate(-10.095614,-136.07145)">
- <path
- sodipodi:nodetypes="cc"
- id="path3411"
- d="M 60,575.21933 C 291.50885,482.18073 495.63028,483.51673 704.28571,575.21933"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <text
- id="text3413"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- xml:space="preserve"><textPath
- id="textPath3415"
- startOffset="50%"
- xlink:href="#path3373"><tspan
- dx="-323.57169"
- dy="-4.2857141"
- id="tspan3417">Tier 40,000: break holds</tspan></textPath></text>
- </g>
- <g
- transform="translate(-10.095614,-65.000023)"
- id="g3419">
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 60,575.21933 C 291.50885,482.18073 495.63028,483.51673 704.28571,575.21933"
- id="path3421"
- sodipodi:nodetypes="cc" />
- <text
- xml:space="preserve"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- id="text3423"><textPath
- xlink:href="#path3373"
- startOffset="50%"
- id="textPath3425"><tspan
- id="tspan3427"
- dy="-4.2857141"
- dx="-323.57169">Tier 30,000: remove packages</tspan></textPath></text>
- </g>
- <g
- transform="translate(-10.095614,-207.14286)"
- id="g3429">
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 60,575.21933 C 291.50885,482.18073 495.63028,483.51673 704.28571,575.21933"
- id="path3431"
- sodipodi:nodetypes="cc" />
- <text
- xml:space="preserve"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- id="text3433"><textPath
- xlink:href="#path3373"
- startOffset="50%"
- id="textPath3435"><tspan
- id="tspan3437"
- dy="-4.2857141"
- dx="-323.57169">Tier 50,000: install from non-default sources</tspan></textPath></text>
- </g>
- <g
- id="g3443"
- transform="translate(232.14286,0)">
- <path
- sodipodi:nodetypes="cscccccsc"
- d="M 481.54506,654.57429 C 481.54506,654.57429 416.03345,631.70995 407.55418,565.97494 C 399.07491,500.23994 407.55418,405.91188 407.55418,405.91188 L 450.86761,405.91188 L 372.04724,305.15008 L 293.22687,405.91188 L 336.5403,405.91188 C 336.5403,405.91188 345.01957,500.23994 336.5403,565.97494 C 328.06103,631.70995 262.54942,654.57429 262.54942,654.57429"
- style="fill:url(#linearGradient3448);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.86149293px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="path3356" />
- <text
- sodipodi:linespacing="125%"
- id="text3439"
- y="383.07648"
- x="372.16736"
- style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- xml:space="preserve"><tspan
- y="383.07648"
- x="372.16736"
- id="tspan3441"
- sodipodi:role="line">Search</tspan></text>
- </g>
- <path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 46.761524,792.36218 L 697.33296,792.36218"
- id="path3450"
- sodipodi:nodetypes="cc" />
- <text
- xml:space="preserve"
- style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- x="51.540756"
- y="785.21936"
- id="text3452"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan3454"
- x="51.540756"
- y="785.21936">Minimum tier</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:12px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="259.28571"
- y="547.36218"
- id="text3456"><tspan
- sodipodi:role="line"
- id="tspan3458"></tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="-144.16441"
- y="674.08392"
- id="text3460"
- transform="matrix(0.9518764,-0.3064822,0.3064822,0.9518764,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3462"
- x="-144.16441"
- y="674.08392">&quot;Install masqmail (sid)&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.99999905px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="135.36403"
- y="646.22766"
- id="text3464"
- transform="matrix(0.9963942,-8.4843987e-2,8.4843987e-2,0.9963942,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3466"
- x="135.36403"
- y="646.22766">&quot;Install xteddy (sid)&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="388.12079"
- y="661.27271"
- id="text3468"
- transform="matrix(0.9954163,9.5637184e-2,-9.5637184e-2,0.9954163,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3470"
- x="388.12079"
- y="661.27271">&quot;Keep libsdl1.2debian at its current version&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="227.14285"
- y="485.21933"
- id="text3472"><tspan
- sodipodi:role="line"
- id="tspan3474"
- x="227.14285"
- y="485.21933" /></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="267.85715"
- y="561.64789"
- id="text3476"><tspan
- sodipodi:role="line"
- id="tspan3478"
- x="267.85715"
- y="561.64789">&quot;Cancel all the user's selections at once&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="510.03586"
- y="437.37546"
- id="text3480"
- transform="matrix(0.993386,0.1148231,-0.1148231,0.993386,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3482"
- x="510.03586"
- y="437.37546">&quot;Remove libgc7-jar&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="18.484432"
- y="523.68884"
- id="text3484"
- transform="matrix(0.9793423,-0.2022095,0.2022095,0.9793423,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3486"
- x="18.484432"
- y="523.68884">&quot;Remove xserver-xorg-video-rendition&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="261.24631"
- y="505.91586"
- id="text3488"
- transform="matrix(0.9996195,-2.758364e-2,2.758364e-2,0.9996195,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3490"
- x="261.24631"
- y="505.91586">&quot;Remove python-gtk2-doc&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="344.41837"
- y="365.37473"
- id="text3492"
- transform="matrix(0.9928348,0.1194954,-0.1194954,0.9928348,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3494"
- x="344.41837"
- y="365.37473">&quot;Install coreutils 7.1-2 (currently held back)&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="-37.612549"
- y="400.81824"
- id="text3496"
- transform="matrix(0.9522996,-0.3051647,0.3051647,0.9522996,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3498"
- x="-37.612549"
- y="400.81824">&quot;Install xserver-xorg (experimental)&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="414.19687"
- y="297.70132"
- id="text3500"
- transform="matrix(0.9970229,7.7106374e-2,-7.7106374e-2,0.9970229,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3502"
- x="414.19687"
- y="297.70132">&quot;Install qt4-doc (experimental)&quot;</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:10.00000095px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="217.91068"
- y="373.79538"
- id="text3504"
- transform="matrix(0.9990762,-4.2974901e-2,4.2974901e-2,0.9990762,0,0)"><tspan
- sodipodi:role="line"
- id="tspan3506"
- x="217.91068"
- y="373.79538">&quot;Install mplayer (debian-multimedia)&quot;</tspan></text>
- </g>
-</svg>
diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am
index 69e14b78..34245663 100644
--- a/doc/fr/Makefile.am
+++ b/doc/fr/Makefile.am
@@ -1,80 +1,12 @@
# automake doesn't play nicely with DocBook :(
-SUBDIRS=images
+include $(top_srcdir)/doc/common.mk
+include $(top_srcdir)/doc/po4a.mk
+SUBDIRS=images
EXTRA_DIST=fixman
LANGCODE=fr
-MANPAGE=aptitude.$(LANGCODE).8
-# How much of the manual is actually translated.
-PERCENT_TRANSLATED=40
-MANPAGE_PERCENT_TRANSLATED=30
-
-IMAGES = $(wildcard $(srcdir)/images/*.png)
-
-HTML2TEXT=$(srcdir)/../html-to-text
-
-# Put documentation in /usr/share/doc/aptitude (by default)
-docdir=$(datadir)/doc/$(PACKAGE)
-
-localemandir=$(mandir)/$(LANGCODE)
-
-# Automake automagically distributes README without asking
-README=README.$(LANGCODE)
-
-if USE_PO4A
-all-local: doc-stamp
-else
-all-local:
-endif
-
-clean-local:
- -rm -fr output-html/ output-txt/ output-man/
- -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp
- -rm -fr $(MANPAGE) $(README) *.tmp
- -rm -fr aptitude.xml manpage.xml
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
- $(mkinstalldirs) $(DESTDIR)$(docdir)/html/$(LANGCODE)/images
- $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/$(LANGCODE)
- $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/$(LANGCODE)/images
-
- $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE)
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
- touch doc-stamp
-
-aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
- po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml
-
-manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po $(srcdir)/../po4a/add_$(LANGCODE)/addendum.1.$(LANGCODE)
- 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
-
-$(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man
- xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml
- mv output-man/aptitude.8 $(MANPAGE)
- /bin/bash $(srcdir)/fixman
-
-$(README): aptitude.xml manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl
- -rm -fr output-txt/
- xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml
- $(HTML2TEXT) output-txt/index.html > $(README)
-
-doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css
- rm -f output-html/aptitude.css
- cp $(srcdir)/../aptitude.css output-html/
- touch doc-css-stamp
-
-doc-html-stamp: aptitude.xml manpage.xml $(srcdir)/../aptitude-html.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES)
- -rm -fr output-html/
-
- xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml
- mkdir output-html/images/
- ln -f $(srcdir)/images/*.png output-html/images/
- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
+XMLSOURCES=aptitude.xml manpage.xml
- touch doc-html-stamp
+IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
diff --git a/doc/fr/fixman b/doc/fr/fixman
index ff13824c..2c895f6a 100755
--- a/doc/fr/fixman
+++ b/doc/fr/fixman
@@ -11,10 +11,8 @@ sed -i 's/search motifs/\\fBsearch\\fR motifs/' $MANPAGE
sed -i 's/\\fBaptitude\\fR help/\\fBaptitude\\fR \\fBhelp\\fR/' $MANPAGE
sed -i 's/^\.SH NAME$/.SH NOM/' $MANPAGE
-head -n-2 $MANPAGE > ${MANPAGE}.tmp
+cp $MANPAGE ${MANPAGE}.tmp
cat ${MANPAGE}.tmp - >$MANPAGE <<EOF
-.SH "AUTEUR"
-Daniel Burrows.
.SH "TRADUCTEURS"
Cette page de man a été originellement traduite par
@@ -23,3 +21,4 @@ Sylvain Cherrier <sylvain.cherrier@free.fr> jusqu'en 2004. Cette page est
depuis maintenue par Olivier Trichet <nive@freesurf.fr>.
EOF
+rm ${MANPAGE}.tmp
diff --git a/doc/it/Makefile.am b/doc/it/Makefile.am
index 7bd69384..38d2fa5f 100644
--- a/doc/it/Makefile.am
+++ b/doc/it/Makefile.am
@@ -1,80 +1,12 @@
# automake doesn't play nicely with DocBook :(
-SUBDIRS=images
+include $(top_srcdir)/doc/common.mk
+include $(top_srcdir)/doc/po4a.mk
+SUBDIRS=images
EXTRA_DIST=
LANGCODE=it
-MANPAGE=aptitude.$(LANGCODE).8
-# How much of the manual is actually translated.
-PERCENT_TRANSLATED=80
-MANPAGE_PERCENT_TRANSLATED=80
-
-IMAGES=$(wildcard $(srcdir)/images/*.png)
-
-HTML2TEXT=$(srcdir)/../html-to-text
-
-## Put documentation in /usr/share/doc/aptitude (by default)
-#docdir=$(datadir)/doc/$(PACKAGE)
-
-localemandir=$(mandir)/$(LANGCODE)
-
-# Automake automagically distributes README without asking
-README=README.$(LANGCODE)
-
-if USE_PO4A
-all-local: doc-stamp
-else
-all-local:
-endif
-
-clean-local:
- -rm -fr output-html/ output-txt/ output-man/
- -rm -f doc-stamp doc-css-stamp doc-html-stamp doc-txt-stamp doc-man-stamp
- -rm -fr $(MANPAGE) $(README) *.tmp
- -rm -fr aptitude.xml manpage.xml
-
-install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localemandir)/man8
- $(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(localemandir)/man8/aptitude.8
- $(mkinstalldirs) $(DESTDIR)$(docdir)/html/$(LANGCODE)/images
- $(INSTALL_DATA) output-html/*.html output-html/*.css $(DESTDIR)$(docdir)/html/$(LANGCODE)
- $(INSTALL_DATA) output-html/images/* $(DESTDIR)$(docdir)/html/$(LANGCODE)/images
-
- $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
- $(INSTALL_DATA) README.$(LANGCODE) $(DESTDIR)$(pkgdatadir)/README.$(LANGCODE)
-
-doc-stamp: doc-html-stamp doc-css-stamp $(README) $(MANPAGE)
- touch doc-stamp
-
-aptitude.xml: $(srcdir)/../en/aptitude.xml $(srcdir)/../po4a/po/$(LANGCODE).po
- po4a-translate -k $(PERCENT_TRANSLATED) -M utf-8 -f docbook -m $(srcdir)/../en/aptitude.xml -p $(srcdir)/../po4a/po/$(LANGCODE).po -l aptitude.xml
-
-manpage.xml: $(srcdir)/../en/manpage.xml $(srcdir)/../po4a/po/$(LANGCODE).po
- 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
-
-$(MANPAGE): aptitude.xml manpage.xml $(srcdir)/../aptitude-man.xsl
- -rm -fr output-man
- xsltproc -o output-man/aptitude.8 $(srcdir)/../aptitude-man.xsl aptitude.xml
- mv output-man/aptitude.8 $(MANPAGE)
-
-$(README): aptitude.xml manpage.xml $(srcdir)/../aptitude-txt.xsl $(srcdir)/../aptitude-common.xsl
- -rm -fr output-txt/
- xsltproc -o output-txt/index.html $(srcdir)/../aptitude-txt.xsl aptitude.xml
- $(HTML2TEXT) output-txt/index.html > $(README)
-
-doc-css-stamp: doc-html-stamp $(srcdir)/../aptitude.css
- rm -f output-html/aptitude.css
- cp $(srcdir)/../aptitude.css output-html/
- touch doc-css-stamp
-
-doc-html-stamp: aptitude.xml manpage.xml $(srcdir)/../aptitude-html.xsl $(srcdir)/../aptitude-common.xsl $(IMAGES)
- -rm -fr output-html/
-
- xsltproc -o output-html/ $(srcdir)/../aptitude-html.xsl aptitude.xml
- mkdir output-html/images/
- ln -f $(srcdir)/images/*.png output-html/images/
- for x in caution important note tip warning; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.png output-html/images/; done
- for x in home next prev up; do ln -s /usr/share/xml/docbook/stylesheet/nwalsh/images/$$x.gif output-html/images/; done
+XMLSOURCES=aptitude.xml manpage.xml
- touch doc-html-stamp
+IMAGES=$(wildcard $(srcdir)/images/*.png) images/safety-cost-level-diagram.png
diff --git a/doc/po4a.mk b/doc/po4a.mk
new file mode 100644
index 00000000..30275b55
--- /dev/null
+++ b/doc/po4a.mk
@@ -0,0 +1,21 @@
+TRANSLATED=aptitude.xml manpage.xml
+
+PO4AFLAGS="--srcdir=$(top_srcdir)/doc" "--destdir=$(top_builddir)/doc" \
+ "$(top_srcdir)/doc/po4a/po4a.cfg"
+
+clean-local: po4a-clean-local
+po4a-clean-local:
+ -rm -fr $(TRANSLATED)
+
+%.xml %.svg: $(top_srcdir)/doc/po4a/po/$(LANGCODE).po
+ if [ -n "$(PO4A)" ]; then \
+ targ="$(LANGCODE)/$@"; \
+ $(PO4A) "--translate-only=$${targ}" $(PO4AFLAGS); \
+ rm -f "$(top_srcdir)/doc/$${targ}" | true; \
+ fi
+
+aptitude.xml: $(top_srcdir)/doc/en/aptitude.xml
+manpage.xml: $(top_srcdir)/doc/en/manpage.xml
+images/safety-cost-level-diagram.svg: $(top_srcdir)/doc/en/images/safety-cost-level-diagram.svg
+
+.PHONY: update-po
diff --git a/doc/po4a/po/Makefile.am b/doc/po4a/po/Makefile.am
index 2ae005b7..e06279f8 100644
--- a/doc/po4a/po/Makefile.am
+++ b/doc/po4a/po/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST=de.po es.po fr.po it.po ja.po pl.po
+EXTRA_DIST=aptitude.pot de.po es.po fr.po it.po ja.po pl.po
clean-generic:
rm -f *~
diff --git a/doc/po4a/po4a.cfg b/doc/po4a/po4a.cfg
index 1d7fa77c..632a6410 100644
--- a/doc/po4a/po4a.cfg
+++ b/doc/po4a/po4a.cfg
@@ -1,15 +1,19 @@
-[po4a_paths] po4a/po/aptitude.pot de:po4a/po/de.po es:po4a/po/es.po fr:po4a/po/fr.po it:po4a/it/it.pl ja:po4a/po/ja.po pl:po4a/po/pl.po
+[po_directory] po4a/po
-[type: docbook] en/aptitude.xml de:de/aptitude.xml es:es/aptitude.xml fr:fr/aptitude.xml it:it/aptitude.xml ja:ja/aptitude.xml pl:pl/aptitude.xml
+[po4a_alias:docbook] docbook opt:"-M utf-8 -o untranslated=<entry><literal>"
+
+[po4a_alias:svg] xml opt:"-M utf-8 -k 0"
+
+[type: docbook] en/aptitude.xml \
+ $lang:$lang/aptitude.xml \
+ opt_fr:"-k 40" \
+ opt_ja:"-k 30"
[type: docbook] en/manpage.xml \
- de:de/manpage.xml \
- es:es/manpage.xml \
- fr:fr/manpage.xml \
- it:it/manpage.xml \
- ja:ja/manpage.xml \
- pl:pl/manpage.xml \
- add_de:po4a/add_de/addendum.1.de \
- add_fr:po4a/add_fr/addendum.1.fr \
- add_pl:po4a/add_pl/addendum.1.pl \
- opt:"-o tags=<entry><literal>"
+ $lang:$lang/manpage.xml \
+ opt_de:"-k 20" \
+ opt_fr:"-k 30" \
+ opt_ja:"-k 20"
+
+[type: svg] en/images/safety-cost-level-diagram.svg \
+ $lang:$lang/images/safety-cost-level-diagram.svg