diff --git a/.gitignore b/.gitignore index 295e59c9..089c0de2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,29 @@ +*.po.* +*.po-* *.mo *.swp *.tmp *~ .git -.gitignore +all-popcon-date.txt all-popcon-pkgs.txt all-popcon-results.txt all-popcon-submissions.txt +build +common.ent debian-reference.*.xml debian-reference.*.xmlt +debian-reference.rawxml +fuzzy.log header.rawxml -packages.bkup.txt packages.contrib +packages.experimental.txt packages.main packages.non-free +packages.oldstable.txt +packages.stable.txt packages.txt pkg.lst -rawxml/debian-reference.rawxml +templates.pot tmp -fuzzy.log -po/templates.pot diff --git a/Makefile b/Makefile index 904c1f37..43594762 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,9 @@ # Build debian-reference (v2) # vim: set ts=8: ####################################################################### -### key adjustable parameters -####################################################################### +#====================================================================== +# ===== Adjustable parameters ========================================= +#====================================================================== # base file name excluding file extension MANUAL := debian-reference # languages translated with PO files @@ -14,21 +15,33 @@ NOPDF := # languages to build document LANGALL = en $(LANGPO) -# Change at the last moment (this package is part of web page) +# Packages uploaded to unstable repo generate official Debian web pages +# Change these to post-release state when Debian is under soft freeze +# +# current "stable" release name +RELEASE_NAME0L := bullseye +RELEASE_NAME0C := Bullseye +# next "stable" / "testing" release name +RELEASE_NAME1L := bookworm +RELEASE_NAME1C := Bookworm +# next next "stable" / next "testing" release name +RELEASE_NAME2L := trixie +RELEASE_NAME2C := Trixie +# release name considered outdated (Release_Date-EOL_for_LTS) +RELEASE_NAMEXX := Jessie 8 (2015-2020) +# release names when this document was last updated +RELEASE_DOC_1 := Bullseye (=stable) +RELEASE_DOC_2 := Bookworm (=testing) -# "stable" release name in document matches current "stable" release name -# * This is used for unstable upload well before almost freeze -# * This is used for post *.2 release updates -#RELEASE_STATE := normal +# version in changelog +DR_VERSION := $(shell dpkg-parsechangelog --show-field Version) +# set SOURCE_DATE_EPOCH if unset (when not called from debhelper) +SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) +# date in changelog +SOURCE_DATE := $(shell date -u +'%F %T %Z' --date=@$(SOURCE_DATE_EPOCH)) -# "stable" release name in document matches current "testing" release name -# * This is used for unstable upload after almost freeze before *.1 release -RELEASE_STATE := freeze - -# TMP_DIR_DR is not mean to be set to generic TMPDIR like /tmp ~/.tmp -ifndef TMP_DIR_DR -TMP_DIR_DR := $(CURDIR)/tmp -endif +# BUILD_DIR is not mean to be set to generic TMPDIR +BUILD_DIR := $(CURDIR)/build # Change $(DRAFTMODE) from "yes" to "maybe" when this document # should go into production mode @@ -59,9 +72,19 @@ GETTEXT := po4a-gettextize -M utf-8 -L utf-8 --format docbook UPDATEPO:= msgmerge --update --previous MSGATTR := msgattrib MSGCAT := msgcat +MSGUNIQ := msguniq --use-first DBLATEX := dblatex +SED := sed -# Debian package archive URL +# Source files +SRC_XML := $(wildcard $(DRAW)/*_*.rawxml) +SRC_ENT:= remote.ent common.ent +# source PO files for all languages (build prcess requires these) +SRC_PO := $(addsuffix .po, $(addprefix $(DPO)/, $(LANGPO))) +# sed script for replace +SEDF ?= $(DBIN)/replace0 + +# Remote file source (related to Debian package archive URLs) #DEBM := http://ftp.us.debian.org/debian/dists #DEBM := http://ftp.jp.debian.org/debian/dists DEBM := http://deb.debian.org/debian/dists @@ -74,7 +97,17 @@ UDEBA := $(DEBM)/$(CODE) UDEBB := $(DEBM)/experimental UDEBC := $(DEBM)/stable UDEBD := $(DEBM)/oldstable -DR_VERSION := $(shell dpkg-parsechangelog --show-field Version) +# processed remote data +PACKAGES_DATA := packages.main packages.contrib packages.non-free \ + packages.txt packages.experimental.txt \ + packages.stable.txt packages.oldstable.txt +POPCON_DATA := all-popcon-results.txt \ + all-popcon-date.txt \ + all-popcon-submissions.txt \ + all-popcon-pkgs.txt +PKG_LIST := pkg.lst +REMOTE_DATA := $(PACKAGES_DATA) $(POPCON_DATA) + ####################################################################### # Used as $(call check-command, , ) @@ -84,6 +117,16 @@ set -e; if ! which $(1) >/dev/null; then \ false; \ fi endef +# Used as $(call check-file, ) +define check-file +set -e; if ! [ -r $(1) ]; then \ + echo "Missing file: $(1)"; \ + false; \ +fi +endef +#====================================================================== +# ===== Build targets ================================================= +#====================================================================== ####################################################################### # $ make all # build all ####################################################################### @@ -97,19 +140,27 @@ all: css html txt epub pdf ####################################################################### .PHONY: test test: html css + cat fuzzy.log + +####################################################################### +# $ make entity # refresh remote.ent (Need remote access) +####################################################################### +# For major English update, run this and commit updated data +.PHONY: entity +entity: + $(MAKE) entityclean + $(MAKE) remote.ent +####################################################################### +# $ make en # build html for testing (for English) +####################################################################### +.PHONY: en +en: + $(MAKE) entity + $(MAKE) html css LANGPO= ####################################################################### # Phase 1 (pre-build): Debian archive stat data ####################################################################### -# fetch remote data (not for every build) and cached these data -PACKAGES_DATA := packages.main packages.contrib packages.non-free \ - packages.txt packages.bkup.txt \ - packages.stable.txt packages.oldstable.txt -POPCON_DATA := all-popcon-results.txt \ - all-popcon-submissions.txt \ - all-popcon-pkgs.txt pkg.lst -REMOTE_DATA := $(PACKAGES_DATA) $(POPCON_DATA) - .PHONY: remote remote: $(REMOTE_DATA) @@ -137,17 +188,17 @@ packages.non-free: grep-dctrl -e -sPackage,Installed-Size -P "." packages.non-free.tmp > packages.non-free rm packages.non-free.tmp -packages.txt: packages.main packages.contrib packages.non-free - # FETCH PACKAGE (sid) - cat packages.main packages.contrib packages.non-free >packages.txt - -packages.bkup.txt: +packages.experimental.txt: # FETCH PACKAGE (experimental main) @$(call check-command, wget, wget) @$(call check-command, grep-dctrl, dctrl-tools) - wget -O - $(UDEBB)/main/binary-$(ARCH)/Packages.xz | xzcat - > packages.bkup.tmp - grep-dctrl -e -sPackage,Installed-Size -P "." packages.bkup.tmp > packages.bkup.txt - rm packages.bkup.tmp + wget -O - $(UDEBB)/main/binary-$(ARCH)/Packages.xz | xzcat - > packages.experimental.tmp + grep-dctrl -e -sPackage,Installed-Size -P "." packages.experimental.tmp > packages.experimental.txt + rm packages.experimental.tmp + +packages.txt: packages.main packages.contrib packages.non-free + # FETCH PACKAGE (sid) + cat packages.main packages.contrib packages.non-free >packages.txt packages.stable.txt: # FETCH PACKAGE (stable main) @@ -173,10 +224,13 @@ all-popcon-results.txt: wget -O - $(UPOPC) | zcat - > all-popcon-results.txt all-popcon-submissions.txt: all-popcon-results.txt - sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt >all-popcon-submissions.txt + sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt > all-popcon-submissions.txt + +all-popcon-date.txt: all-popcon-results.txt + echo "" > all-popcon-date.txt all-popcon-pkgs.txt: all-popcon-results.txt - grep --binary-files=text -e '^Package: [a-z0-9][-+a-z0-9.]*[ 0-9]*$$' < all-popcon-results.txt >all-popcon-pkgs.txt + grep --binary-files=text -e '^Package: [a-z0-9][-+a-z0-9.]*[ 0-9]*$$' < all-popcon-results.txt > all-popcon-pkgs.txt # RAWXML (with @emacs@ etc.) to PACKAGE LIST pkg.lst: $(DRAW)/$(MANUAL).rawxml @@ -185,88 +239,52 @@ pkg.lst: $(DRAW)/$(MANUAL).rawxml $(XPNO) $(DXSL)/pkg.xsl $(DRAW)/$(MANUAL).rawxml > pkg.lst # ENTITY DATA -# source XML inclusion files (excluding common.ent) -ENT_STAT:= datadatepop.ent datadatesize.ent popcon.ent pkgsize.ent common.ent +# source XML inclusion file (pre-commited since this needs remote access) +remote.ent: + $(MAKE) $(REMOTE_DATA) $(PKG_LIST) + cat all-popcon-date.txt > remote.ent + echo "" >> remote.ent + echo "" >> remote.ent + echo "" >> remote.ent + echo "" >> remote.ent + sort pkg.lst | uniq | $(DBIN)/sizeent packages.txt packages.experimental.txt packages.stable.txt packages.oldstable.txt >> remote.ent + echo "" >> remote.ent + echo "" >> remote.ent + echo "" >> remote.ent + grep -e '^Package:' all-popcon-pkgs.txt | grep -f pkg.lst | $(DBIN)/popconent `cat all-popcon-submissions.txt` >> remote.ent -datadatesize.ent: packages.txt packages.main packages.contrib packages.non-free - # GENERATE datesize.ent - echo "" > datadatesize.ent - echo "" >> datadatesize.ent - echo "" >> datadatesize.ent - echo "" >> datadatesize.ent - echo "" >> datadatesize.ent - - -datadatepop.ent: - # GENERATE datadatepop.ent - echo "" > datadatepop.ent - -popcon.ent: all-popcon-results.txt all-popcon-pkgs.txt all-popcon-submissions.txt pkg.lst - # GENERATE datadatepop.ent - echo "" > popcon.ent - echo "" >> popcon.ent - echo "" >> popcon.ent - grep -e '^Package:' all-popcon-pkgs.txt | grep -f pkg.lst | $(DBIN)/popconent `cat all-popcon-submissions.txt` >> popcon.ent - -pkgsize.ent: pkg.lst packages.txt packages.bkup.txt packages.stable.txt packages.oldstable.txt - # GENERATE pkgsize.ent - sort pkg.lst | uniq | $(DBIN)/sizeent packages.txt packages.bkup.txt packages.stable.txt packages.oldstable.txt > pkgsize.ent - - # POPCON - wget -O - $(UPOPC) | zcat - > all-popcon-results.txt - sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt >all-popcon-submissions.txt - grep --binary-files=text -e '^Package: [a-z0-9][-+a-z0-9.]*[ 0-9]*$$' < all-popcon-results.txt >all-popcon-pkgs.txt - -common.ent: - # GENERATE common.ent - # Release for package match with actual situation - echo "" > common.ent - echo "" >> common.ent +# GENERATE +# source XML inclusion file updated for normal build (no remote access) +common.ent: Makefile debian/changelog + echo "" > common.ent echo "" >> common.ent -ifeq ($(RELEASE_STATE),normal) - # Build for web to match current reality - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent -else - # For post-almost-freeze upload to match post-release reality - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent - echo "" >> common.ent -endif + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent echo "" >> common.ent echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent + echo "" >> common.ent -# For major English update, run this and commit data -.PHONY: entity -entity: - $(MAKE) distclean - $(MAKE) $(ENT_STAT) - $(MAKE) clean - # PLEASE MAKE SURE TO COMMIT TO VCS ####################################################################### -# Phase 2(build): RAWXML (template) -> XML -> All formats +# Phase 2(build): RAWXML (template) -> English XML ####################################################################### -.PHONY: rawxml -rawxml: $(DRAW)/$(MANUAL).rawxml - -$(DRAW)/$(MANUAL).rawxml: $(wildcard $(DRAW)/*_*.rawxml) +$(DRAW)/$(MANUAL).rawxml: $(SRC_XML) #echo $^ cd $(DRAW) ; ./merge.sh # Update URL list header from $(MANUAL).rawxml -$(DRAW)/header.rawxml: $(DRAW)/header1.rawxml $(DRAW)/header2.rawxml +$(DRAW)/header.rawxml: $(DRAW)/header1.rawxml $(DRAW)/header2.rawxml $(DRAW)/$(MANUAL).rawxml cat $(DRAW)/header1.rawxml > $(DRAW)/header.rawxml $(XPNO) $(DXSL)/urls.xsl $(DRAW)/$(MANUAL).rawxml | sort | uniq |\ - sed -e "s/&/\&/g" >> $(DRAW)/header.rawxml + sed -e "s/&/\&/g" | fgrep -v -e '' >> $(DRAW)/header.rawxml cat $(DRAW)/header2.rawxml >> $(DRAW)/header.rawxml # Replace table contents with @-@popcon*@-@ and @@@psize*@-@ and @@ -279,7 +297,7 @@ $(MANUAL).en.xml: $(DRAW)/$(MANUAL).rawxml $(DRAW)/header.rawxml sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@ # Replace table contents with dummy text and -# fix URL referencees and table ID as the template for translation. +# fix URL references and table ID as the template for translation. # This avoids bloated PO/POT files. (tablet.xsl used instead of table.xsl) $(MANUAL).en.xmlt: $(DRAW)/$(MANUAL).rawxml $(DRAW)/header.rawxml # GENERATE $(MANUAL).en.xmlt (TEMPLATE to avoid bloated PO/POT files) @@ -291,10 +309,8 @@ $(MANUAL).en.xmlt: $(DRAW)/$(MANUAL).rawxml $(DRAW)/header.rawxml sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@ ####################################################################### -# Phase 7 build : POT/PO/XML non-ENGLISH (with template XML) +# Phase 3 build : English XML -> POT/PO/XML non-ENGLISH ####################################################################### -# source PO files for all languages (build prcess requires these) -SRC_PO := $(addsuffix .po, $(addprefix $(DPO)/, $(LANGPO))) .PHONY: po pot pot: $(DPO)/templates.pot po: $(SRC_PO) @@ -324,89 +340,88 @@ $(DPO)/%.po: $(DPO)/templates.pot FORCE $(DBIN)/fuzzypo $(DPO)/$*.po >>fuzzy.log FORCE: + @: "FORCE target" -# source XML files for all languages (build prcess requires these) -SRC_XML := $(addsuffix .xml, $(addprefix $(MANUAL)., $(LANGALL))) +# base XML files for all languages .PHONY: xml -xml: $(SRC_XML) +xml: $(addsuffix .xml, $(addprefix $(MANUAL)., $(LANGALL))) $(MANUAL).%.xml: $(DPO)/%.po $(MANUAL).en.xml @$(call check-command, po4a-translate, po4a) @$(call check-command, msgcat, gettext) $(DBIN)/genxml $* - ####################################################################### -# Phase 8 build : Formatted conversion from XML +# Phase 4 build : Formatted conversion from XML ####################################################################### ####################################################################### -# $ make css # update CSS and DIMG in $(TMP_DIR_DR) +# $ make css # update CSS and DIMG in $(BUILD_DIR) ####################################################################### .PHONY: css css: - -rm -rf $(TMP_DIR_DR)/images - mkdir -p $(TMP_DIR_DR)/images - cp -f $(DXSL)/$(MANUAL).css $(TMP_DIR_DR)/$(MANUAL).css - echo "AddCharset UTF-8 .txt" > $(TMP_DIR_DR)/.htaccess - #cd $(DIMG) ; cp caution.png home.png important.png next.png note.png prev.png tip.png up.gif warning.png $(TMP_DIR_DR)/images - cd $(DIMG) ; cp caution.png important.png note.png tip.png up.gif warning.png $(TMP_DIR_DR)/images - cd png ; cp home.png next.png prev.png $(TMP_DIR_DR)/images + -rm -rf $(BUILD_DIR)/images + mkdir -p $(BUILD_DIR)/images + cp -f $(DXSL)/$(MANUAL).css $(BUILD_DIR)/$(MANUAL).css + echo "AddCharset UTF-8 .txt" > $(BUILD_DIR)/.htaccess + #cd $(DIMG) ; cp caution.png home.png important.png next.png note.png prev.png tip.png up.gif warning.png $(BUILD_DIR)/images + cd $(DIMG) ; cp caution.png important.png note.png tip.png up.gif warning.png $(BUILD_DIR)/images + cd png ; cp home.png next.png prev.png $(BUILD_DIR)/images ####################################################################### -# $ make html # update all HTML in $(TMP_DIR_DR) +# $ make html # update all HTML in $(BUILD_DIR) ####################################################################### .PHONY: html -html: $(foreach LX, $(LANGALL), $(TMP_DIR_DR)/index.$(LX).html) +html: $(foreach LX, $(LANGALL), $(BUILD_DIR)/index.$(LX).html) -$(TMP_DIR_DR)/index.%.html: $(MANUAL).%.xml +$(BUILD_DIR)/index.%.html: $(MANUAL).%.xml $(SRC_ENT) @$(call check-command, xsltproc, xsltproc) - -mkdir -p $(TMP_DIR_DR) - $(XPINC) --stringparam base.dir $(TMP_DIR_DR)/ \ + -mkdir -p $(BUILD_DIR) + $(XPINC) --stringparam base.dir $(BUILD_DIR)/ \ --stringparam html.ext .$*.html \ $(DXSL)/style-html.xsl $< ####################################################################### -# $ make txt # update all Plain TEXT in $(TMP_DIR_DR) +# $ make txt # update all Plain TEXT in $(BUILD_DIR) ####################################################################### .PHONY: txt -txt: $(foreach LX, $(LANGALL), $(TMP_DIR_DR)/$(MANUAL).$(LX).txt.gz) +txt: $(foreach LX, $(LANGALL), $(BUILD_DIR)/$(MANUAL).$(LX).txt.gz) # style-txt.xsl provides work around for hidden URL links by appending them explicitly. -$(TMP_DIR_DR)/$(MANUAL).%.txt.gz: $(MANUAL).%.xml +$(BUILD_DIR)/$(MANUAL).%.txt.gz: $(MANUAL).%.xml $(SRC_ENT) @$(call check-command, w3m, w3m) @$(call check-command, xsltproc, xsltproc) - -mkdir -p $(TMP_DIR_DR) + -mkdir -p $(BUILD_DIR) @test -n "`which w3m`" || { echo "ERROR: w3m not found. Please install the w3m package." ; false ; } $(XPINC) $(DXSL)/style-txt.xsl $< | LC_ALL=en_US.UTF-8 \ w3m -o display_charset=UTF-8 -cols 70 -dump -no-graph -T text/html | \ gzip -n -9 - > $@ ####################################################################### -# $ make pdf # update all PDF in $(TMP_DIR_DR) +# $ make pdf # update all PDF in $(BUILD_DIR) ####################################################################### .PHONY: pdf -pdf: $(foreach LX, $(LANGALL), $(TMP_DIR_DR)/$(MANUAL).$(LX).pdf) +pdf: $(foreach LX, $(LANGALL), $(BUILD_DIR)/$(MANUAL).$(LX).pdf) -nopdf: $(TMP_DIR_DR)/nopdf.pdf +nopdf: $(BUILD_DIR)/nopdf.pdf -$(TMP_DIR_DR)/nopdf.pdf: nopdf.tex +$(BUILD_DIR)/nopdf.pdf: nopdf.tex -mkdir -p $(CURDIR)/tmp cd "$(CURDIR)/tmp/"; \ xelatex ../nopdf.tex -$(foreach LX, $(NOPDF), $(TMP_DIR_DR)/$(MANUAL).$(LX).pdf): $(TMP_DIR_DR)/nopdf.pdf - -mkdir -p $(TMP_DIR_DR) - cp $(TMP_DIR_DR)/nopdf.pdf $@ +$(foreach LX, $(NOPDF), $(BUILD_DIR)/$(MANUAL).$(LX).pdf): $(BUILD_DIR)/nopdf.pdf + -mkdir -p $(BUILD_DIR) + cp $(BUILD_DIR)/nopdf.pdf $@ # dblatex.xsl provide work around for hidden URL links by appending them explicitly. -$(TMP_DIR_DR)/$(MANUAL).%.pdf: $(MANUAL).%.xml +$(BUILD_DIR)/$(MANUAL).%.pdf: $(MANUAL).%.xml $(SRC_ENT) @$(call check-command, dblatex, dblatex) @$(call check-command, xsltproc, xsltproc) -mkdir -p $(CURDIR)/tmp @test -n "`which $(DBLATEX)`" || { echo "ERROR: dblatex not found. Please install the dblatex package." ; false ; } export TEXINPUTS=".:"; \ - export TMP_DIR_DR="$(CURDIR)/tmp/"; \ + export BUILD_DIR="$(CURDIR)/tmp/"; \ $(XPINC) $(DXSL)/dblatex.xsl $< | \ $(DBLATEX) --style=native \ --debug \ @@ -418,17 +433,17 @@ $(TMP_DIR_DR)/$(MANUAL).%.pdf: $(MANUAL).%.xml --output=$@ - || { echo "OMG!!!!!! XXX_CHECK_XXX ... Do not worry ..."; true ; } ####################################################################### -# $ make tex # update all TeX source in $(TMP_DIR_DR) +# $ make tex # update all TeX source in $(BUILD_DIR) ####################################################################### .PHONY: tex -tex: $(foreach LX, $(LANGALL), $(TMP_DIR_DR)/$(MANUAL).$(LX).tex) +tex: $(foreach LX, $(LANGALL), $(BUILD_DIR)/$(MANUAL).$(LX).tex) # dblatex.xsl provide work around for hidden URL links by appending them explicitly. -$(TMP_DIR_DR)/$(MANUAL).%.tex: $(MANUAL).%.xml +$(BUILD_DIR)/$(MANUAL).%.tex: $(MANUAL).%.xml $(SRC_ENT) -mkdir -p $(CURDIR)/tmp @test -n "`which $(DBLATEX)`" || { echo "ERROR: dblatex not found. Please install the dblatex package." ; false ; } export TEXINPUTS=".:"; \ - export TMP_DIR_DR="$(CURDIR)/tmp/"; \ + export BUILD_DIR="$(CURDIR)/tmp/"; \ $(XPINC) $(DXSL)/dblatex.xsl $< | \ $(DBLATEX) --style=native \ --debug \ @@ -441,54 +456,71 @@ $(TMP_DIR_DR)/$(MANUAL).%.tex: $(MANUAL).%.xml --output=$@ - || { echo "OMG!!!!!! XXX_CHECK_XXX ... Do not worry ..."; true ; } ####################################################################### -# $ make epub # update all epub in $(TMP_DIR_DR) +# $ make epub # update all epub in $(BUILD_DIR) ####################################################################### .PHONY: epub -epub: $(foreach LX, $(LANGALL), $(TMP_DIR_DR)/$(MANUAL).$(LX).epub) +epub: $(foreach LX, $(LANGALL), $(BUILD_DIR)/$(MANUAL).$(LX).epub) -$(TMP_DIR_DR)/$(MANUAL).%.epub: $(MANUAL).%.xml +$(BUILD_DIR)/$(MANUAL).%.epub: $(MANUAL).%.xml $(SRC_ENT) @$(call check-command, xsltproc, xsltproc) - -mkdir -p $(TMP_DIR_DR)/$*/ - cd $(TMP_DIR_DR)/$*/ ; $(XPINC) $(CURDIR)/$(DXSL)/style-epub.xsl $(CURDIR)/$< - cp -f $(DXSL)/mimetype $(TMP_DIR_DR)/$*/mimetype - cp -f $(DXSL)/debian-reference.css $(TMP_DIR_DR)/$*/OEBPS/debian-reference.css - cp -f $(DXSL)/debian-openlogo.png $(TMP_DIR_DR)/$*/OEBPS/debian-openlogo.png - cd $(TMP_DIR_DR)/$*/ ; zip -r $@ ./ + -mkdir -p $(BUILD_DIR)/$*/ + cd $(BUILD_DIR)/$*/ ; $(XPINC) $(CURDIR)/$(DXSL)/style-epub.xsl $(CURDIR)/$< + cp -f $(DXSL)/mimetype $(BUILD_DIR)/$*/mimetype + cp -f $(DXSL)/debian-reference.css $(BUILD_DIR)/$*/OEBPS/debian-reference.css + cp -f $(DXSL)/debian-openlogo.png $(BUILD_DIR)/$*/OEBPS/debian-openlogo.png + cd $(BUILD_DIR)/$*/ ; zip -r $@ ./ ####################################################################### -# Phase 9 post/pre build: clean and distclean +# Phase 5 cleans ####################################################################### ####################################################################### # $ make clean # clean files ready for tar +# (override_dh_auto_clean call this) ####################################################################### .PHONY: clean -clean: - # CLEAN - -rm -f *.swp *~ *.tmp - -rm -f $(DPO)/*~ $(DPO)/*.mo $(DPO)/*.po.* - -rm -rf tmp debian/tmp $(PUBLISHDIR)/$(MANUAL) - -rm -f $(addsuffix .xml, $(addprefix $(MANUAL)., $(LANGALL))) - -rm -f $(MANUAL).en.xml $(MANUAL).en.xmlt header.rawxml - -rm -f $(REMOTE_DATA) - -####################################################################### -# $ make distclean # clean files to reset RAWXML/ENT/POT -####################################################################### +clean: localclean remoteclean .PHONY: distclean distclean: clean - # DISTCLEAN - -rm -f $(ENT_STAT) +####################################################################### +# $ make localclean # clean locally generated files +####################################################################### +.PHONY: localclean +localclean: + # CLEAN + -rm -rf $(BUILD_DIR) + -rm -rf debian/tmp + -rm -f *.swp *~ *.tmp + -rm -f $(DPO)/*~ $(DPO)/*.mo $(DPO)/*.po.* + -rm -f common.ent + -rm -f $(addsuffix .xml, $(addprefix $(MANUAL)., $(LANGALL))) + -rm -f $(addsuffix .xmlt, $(addprefix $(MANUAL)., $(LANGALL))) + -rm -f $(DRAW)/$(MANUAL).rawxml + -rm -f $(DRAW)/header.rawxml -rm -f $(DPO)/*.pot -rm -f fuzzy.log ####################################################################### -### Utility targets +# $ make remoteclean # clean remote data to generate entity files ####################################################################### +.PHONY: remoteclean +remoteclean: + -rm -f $(REMOTE_DATA) + +####################################################################### +# $ make entityclean # clean entity files generated from remote data +####################################################################### +.PHONY: entityclean +entityclean: + -rm -f remote.ent + +#====================================================================== +# ===== Utility targets =============================================== +#====================================================================== ####################################################################### # $ make wrap # wrap all PO ####################################################################### -.PHONY: wrap nowrap wip +.PHONY: wrap nowrap wip replace wrap: @$(call check-command, msgcat, gettext) for XX in $(foreach LX, $(LANGPO), $(DPO)/$(LX).po); do \ @@ -500,6 +532,22 @@ nowrap: $(MSGCAT) -o $$XX --no-wrap $$XX ;\ done +replace: + @$(call check-file, $(SEDF)) + @$(call check-command, msgcat, gettext) + @$(call check-command, msguniq, gettext) + for XX in $(foreach LX, $(LANGPO), $(DPO)/$(LX).po); do \ + $(MSGCAT) -o $$XX --no-wrap $$XX ;\ + done + for XX in $(foreach LX, $(LANGPO), $(DPO)/$(LX).po); do \ + cat $$XX >$$XX.sed ;\ + $(SED) -f $(SEDF) <$$XX | sed -n -e '/^msgid "[^"]/,$$p' >>$$XX.sed ;\ + $(MSGUNIQ) -o $$XX.uniq $$XX.sed ;\ + done + for XX in $(foreach LX, $(LANGPO), $(DPO)/$(LX).po); do \ + $(MSGCAT) -o $$XX $$XX.uniq ;\ + done + wip: @$(call check-command, msgattrib, gettext) for XX in $(foreach LX, $(LANGPO), $(DPO)/$(LX).po); do \ @@ -513,7 +561,7 @@ wip: ####################################################################### .PHONY: rsync rsync: all - rsync -avz $(TMP_DIR_DR)/ osamu@people.debian.org:public_html/debian-reference/ + rsync -avz $(BUILD_DIR)/ osamu@people.debian.org:public_html/debian-reference/ ####################################################################### # $ make url # check duplicate URL references @@ -524,14 +572,3 @@ url: $(MANUAL).en.xml -sed -ne "/^<\!ENTITY/s/<\!ENTITY \([^ ]*\) .*$$/\" \1 \"/p" < $< | uniq -d | xargs -n 1 grep $< -e | grep -e "^<\!ENTITY" @echo "----- Duplicate URL references (end) -----" -####################################################################### -# Translate all -####################################################################### -$(DPO)/wikipedia.%.pot: $(DPO)/wikipedia.list - $(DBIN)/interwiki $* "PRINT" < $< > $@ - -####################################################################### -# Translate untranslated -####################################################################### -$(DPO)/wikipedia.%.po: $(DPO)/wikipedia.%.list - $(DBIN)/interwiki $* "NO" < $< > $@ diff --git a/README.md b/README.md index 82ad7dbf..dea98102 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,9 @@ this debian-reference salsa repository. If you are a non-Debian Developer with `*-guest` account on salsa who needs write access to this debian-reference salsa repository, you can inform your `*-guest` account to me (or any DD) with clear intent and reasonable rationale and let me (or any DD) -invite you to the write access with the "Developer" status from [the main -debian-reference project -page](https://salsa.debian.org/debian/debian-reference) via Setting-Member -menu. +invite you to the write access with the "Developer" status from +[the main debian-reference project page](https://salsa.debian.org/debian/debian-reference) +via Setting-Member menu. See https://wiki.debian.org/Salsa/Doc for how to use this site. @@ -358,43 +357,88 @@ The English source is kept as rawxml/*_*.rawxml files under rawxml/. The translation source is kept as PO files under po/. ``` - >>> rawxml/*_*.rawxml - | - >>> debian-reference.rawxml ------> (make entity) <=> remotely fetched - | | | : data files (+) - | | +---------------------+ : - | | | : - | v v v - | debian-reference.en.xml common.ent url.ent and *.ent files - | : (**) | | | - v v | | | - debian-reference.en.xmlt | | | - | | | | - v | | | - templates.pot | | | - | | | | - v (make po) | | | - >>> ja.po | | | - | fuzzy.log (++) | | | - v | | | - debian-reference.ja.xml | | | - | | | | - v v v v - +----------+-------------+-----------+--------+ - |(make all), (make test), - |(make html), (make txt), (make pdf), ... - v + >>> rawxml/*_*.rawxml remotely fetched data files + $(RAWXML) $(REMOTE_DATA) + ========= ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | : + | : + debian-reference.rawxml : + | : + | : + +---> pkg.lst -------------------> pkgsize.ent, popcon.ent, common.ent + | $(RAWENT) (+) + | ======== + | | + +---> $(DRAW)/header.rawxml | + | | | + +<--------+ | + | | + | | + +---------------------------+ | + | | | + | | | + debian-reference.en.xmlt debian-reference.en.xml | + | (**) | | | + | | | | + templates.pot | | | + | | | | + | | | | + ja.po | | | + $(PO) | | | + ===== | | | + | | | | + | | | | + +---------------------------+ | | + | | | + | | | + debian-reference.ja.xml | | + | (fuzzy.log) (++) | | + | | | + | | | + +----------------------------------------------+----------+ + |(make all), (make test), + |(make html), (make txt), (make pdf), ... + v all documents (*.*.html *.*.txt *.*.pdf) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` +``` +# RAWXML updated with reference to new packages + $ make entity # update all RAWENT with REMOTE_DATA (NET) +# RAWXML updated without reference to new packages + $ # no action needed +# before PO update for LANGPO=XX + $ make po LANGPO=XX # update all PO in sync with RAWXML and RAWENT +# after PO update for LANGPO=XX + $ make po LANGPO=XX # normalize PO +# clean source for commit (except ===== data) + $ make clean +# clean source for commit (except ===== and ^^^^^^^ data) (Keep remote data) + $ make localclean +# clean source including entity (except ===== and ^^^^^^^ data) (Keep remote data) + $ make entityclean +# build package + $ make all # build all documents +# test build English html (keep REMOTE_DATA) + $ make en +# test build LANGPO=XX html + $ make test LANGPO=XX +# no wrap po file for LANGPO=XX + $ make nowrap LANGPO=XX +# wrap po file for LANGPO=XX + $ make wrap LANGPO=XX +# replace string with 'sed -f foo' over po file for LANGPO=XX + $ make replace LANGPO=XX SEDF=foo +``` * (`+`) When the English source changes URL link location or packages - mentioned in the package list table, you need to update `*.ent` files in the - source by running "`make entity`" with remote file access. + mentioned in the package list table, you need to update `*.ent` files in the + source by running "`make entity`" with remote file access. * (`**`) `debian-reference.en.xmlt` effectively replaces untranslatable - contents in `debian-reference.en.xml` with "DUMMY" to reduce clutter in PO - files. + contents in `debian-reference.en.xml` with "DUMMY" to reduce clutter in PO + files. * (`++`) `fuzzy.log` file contains number of fuzzy translation. If not zero, - please update PO file. + please manually update PO file contents. ### Build failure due to po/*.add @@ -408,32 +452,6 @@ rename `po/foo.add-keep` back to `po/foo.add` and update the matching string. It's tricky. (This should be less problematic after recent po4a updates) -### List of make targets - -``` - $ make all # build all - $ make test # build html for testing (for Translator) - $ make package # build html and text from RAWXML/PO for DDP - $ make publish # build html text pdf from RAWXML/PO for DDP - $ make clean # clean files ready for tar - $ make distclean # clean files to reset ENT/POT - $ make rawxml # update debian-reference.rawxml from split-RAWXML - $ make entity # update ENT and local cache data from RAWXML/REMOTE - $ make po # update all PO from RAWXML - $ make wrap # wrap all PO - $ make xml # update all XML from RAWXML/ENT/PO/ADD - $ make css # update CSS and IMAGES in $(PUBLISHDIR) - $ make html # update all HTML in $(PUBLISHDIR) - $ make txt # update all Plain TEXT in $(PUBLISHDIR) - $ make pdf # update all PDF in $(PUBLISHDIR) - $ make tex # update all TeX source in $(PUBLISHDIR) - $ make url # check duplicate URL references -``` - -Wikipedia URLs: - -`bin/interwiki` script can be used to check translated URLs. - ## Publication to the www.debian.org servers The contents of `debian-reference` are published to the www.debian.org servers @@ -451,10 +469,7 @@ www.debian.org servers. ## Is there easier way to edit XML source -For now, asciidoc source in asciidoc branch is in sync with XML source in this -master branch. You need to run script in buster environment where python2 is -available. We may convert this XML source to easier format such as Sphinx in -future. +Unfortunately, no. ## Reminder diff --git a/bin/colspec.py b/bin/colspec.py index a891d4a0..a7eb3545 100755 --- a/bin/colspec.py +++ b/bin/colspec.py @@ -40,6 +40,8 @@ if __name__ == '__main__': colwidth = (20,12,6,12,12,38) elif tgroup_cols == 7: colwidth = (20,12,6,12,12,12,26) + elif tgroup_cols == 8: + colwidth = (20,12,6,6,6,6,6,26) # List of exceptions if table_id == "thenumericmodefoinchmodbcommands": colwidth = (20,80) diff --git a/bin/docbook.conf b/bin/docbook.conf deleted file mode 100644 index 771d393c..00000000 --- a/bin/docbook.conf +++ /dev/null @@ -1,601 +0,0 @@ -# -# docbook.conf -# -# Asciidoc configuration file. -# Default docbook backend. -# - -[miscellaneous] -outfilesuffix=.xml -# Printable page width in pts. -pagewidth=380 -pageunits=pt - -[attributes] -basebackend=docbook -basebackend-docbook= - -[replacements] -# Line break markup is dropped (there is no DocBook line break tag). -(?m)^(.*)\s\+$=\1 -ifdef::asciidoc7compatible[] -# Superscripts. -\^(.+?)\^=\1 -# Subscripts. -~(.+?)~=\1 -endif::asciidoc7compatible[] - -[ruler-blockmacro] -# Only applies to HTML so don't output anything. - -[image-inlinemacro] - - - - - {1={target}} - - -[image-blockmacro] -{title} -{title%} - - - - - {1={target}} - -{title#} -{title%} - -[indexterm-inlinemacro] -# Inline index term. -# Generate separate index entries for primary, secondary and tertiary -# descriptions. -# Primary only. -{2%} -{2%} {1} -{2%} -# Primary and secondary. -{2#}{3%} -{2#}{3%} {1}{2} -{2#}{3%} -{2#}{3%} -{2#}{3%} {2} -{2#}{3%} -# Primary, secondary and tertiary. -{3#} - {1}{2}{3} -{3#} -{3#} - {2}{3} -{3#} -{3#} - {3} -{3#} - -[indexterm2-inlinemacro] -# Inline index term. -# Single entry index term that is visible in the primary text flow. - - {1} - -{1} - -[footnote-inlinemacro] -# Inline footnote. -{0} - -[callout-inlinemacro] -# Inline callout. - - -[tags] -# Bulleted, numbered and labeled list tags. -ilist={title?{title}}| -ilistitem=| -ilisttext=| -olist={title?{title}}| -olist2=| -olistitem=| -olisttext=| -vlist={title?{title}}| -vlistentry=| -vlistterm=| -vlisttext=| -vlistitem=| -# Horizontal labeled list (implemented with two column table). -# Hardwired column widths to 30%,70% because the current crop of PDF -# generators do not auto calculate column widths. -hlist=<{title?table}{title!informaltable}{id? id="{id}"} tabstyle="{style=hlabeledlist}" pgwide="0" frame="none" colsep="0" rowsep="0">{title?{title}}|<{title?/table}{title!/informaltable}> -hlistentry=| -hlisttext=| -hlistterm=| -hlistitem=| - -# Question and Answer list. -qlist={title?{title}}| -qlistentry=| -qlistterm=| -qlistitem=| -qlisttext=| -# Bibliography list. -blist=| -blistitem=| -blisttext=| -# Glossary list. -glist=| -glistentry=| -glistterm=| -glistitem=| -glisttext=| -# Callout list. -colist={title?{title}}| -colistitem=| -colisttext=| - -# Quoted text -emphasis='|' -strong=| -monospaced=| -quoted={amp}#8220;|{amp}#8221; -unquoted=| -subscript=| -superscript=| - -# $$ inline passthrough. -$$passthrough=| - -# Inline macros -[http-inlinemacro] -{0={name}:{target}} -[https-inlinemacro] -{0={name}:{target}} -[ftp-inlinemacro] -{0={name}:{target}} -[file-inlinemacro] -{0={name}:{target}} -[mailto-inlinemacro] -{0={target}} -[callto-inlinemacro] -{0={target}} -[link-inlinemacro] -{0={target}} -# anchor:id[text] -[anchor-inlinemacro] - -# [[id,text]] -[anchor2-inlinemacro] - -# [[[id]]] -[anchor3-inlinemacro] -[{1}] -# xref:id[text] -[xref-inlinemacro] -{0} -{2%} -# <> -[xref2-inlinemacro] -{2} -{2%} - - -# Special word macros -[emphasizedwords] -{words} -[monospacedwords] -{words} -[strongwords] -{words} - -# Paragraph substitution. -[paragraph] -{title} -{title%} -| -{title%} -{title#} -{empty} - -[admonitionparagraph] -<{name}{id? id="{id}"}>| - -[literalparagraph] -# The literal block employs the same markup. -template::[literalblock] - -[verseparagraph] -template::[verseblock] - -# Delimited blocks. -[literalblock] -{title} - -| - -{title#} - -[listingblock] -{title} - -| - -{title#} - -[sidebarblock] - -{title} -| - - -[passthroughblock] -| - -[quoteblock] - -{title} -# Include attribution only if either {attribution} or {citetitle} are defined. -{attribution#} -{attribution%}{citetitle#} -{attribution} -{citetitle} -{attribution#} -{attribution%}{citetitle#} -| - - -[verseblock] - -{title} -# Include attribution only if either {attribution} or {citetitle} are defined. -{attribution#} -{attribution%}{citetitle#} -{attribution} -{citetitle} -{attribution#} -{attribution%}{citetitle#} - -| - - - -[exampleblock] -<{title?example}{title!informalexample}{id? id="{id}"}> -{title} -| - - -[admonitionblock] -<{name}{id? id="{id}"}> -{title} -| - - -# Tables. -[tabledef-default] -template=table -colspec= -bodyrow=| -bodydata=| - -[table] -<{title?table}{title!informaltable}{id? id="{id}"} pgwide="0" -frame="{frame=topbot}" -{grid%rowsep="0" colsep="0"} -rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" -> -{title} - -{colspecs} -{headrows#} -{headrows} -{headrows#} -{footrows#} -{footrows} -{footrows#} - -{bodyrows} - - - - -[specialsections] -ifdef::doctype-article[] -^Abstract$=sect-abstract -endif::doctype-article[] - -ifdef::doctype-book[] -^Colophon$=sect-colophon -^Dedication$=sect-dedication -^Preface$=sect-preface -endif::doctype-book[] - -^Index$=sect-index -^(Bibliography|References)$=sect-bibliography -^Glossary$=sect-glossary -^Appendix [A-Z][:.](?P.*)$=sect-appendix - -# Special sections. -[sect-preface] -<preface{id? id="{id}"}> -<title>{title} -| - - -[sect-index] - -{title} -| - - -[sect-bibliography] - -{title} -| - - -[sect-glossary] - -{title} -| - - -[sect-appendix] - -{title} -| - - - -[header-declarations] - - - -#------------------------- -# article document type -#------------------------- -ifdef::doctype-article[] - -[header] -template::[header-declarations] - -
-{doctitle#} - {doctitle} - {date} - {authored#} - {personname} -
{email}
- {authored#}
- {authorinitials} - -# If file named like source document with -revhistory.xml suffix exists -# include it as the document history, otherwise use current revision. -{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} -{revisionhistory%}{revision}{date}{authorinitials?{authorinitials}}{revremark?{revremark}} - - {companyname} -{doctitle#}
- -[footer] -
- -[preamble] -# Untitled elements between header and first section title. -| - -[sect-abstract] - -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -[sect4] - -{title} -| - - -endif::doctype-article[] - -#------------------------- -# manpage document type -#------------------------- -ifdef::doctype-manpage[] - -[replacements] -# The roff format does not substitute special characters so just print them as -# text. -\(C\)=(C) -\(TM\)=(TM) - -[header] -template::[header-declarations] - - -{mantitle} -{manvolnum} -{mansource} -{manversion} -{manmanual} - - - {manname} - {manpurpose} - - -[footer] - - -# Section macros -[sect-synopsis] - -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -endif::doctype-manpage[] - -#------------------------- -# book document type -#------------------------- -ifdef::doctype-book[] - -[header] -template::[header-declarations] - - -{doctitle#} - {doctitle} - {date} - {authored#} - {personname} -
{email}
- {authored#}
- -# If file named like source document with -revhistory.xml suffix exists -# include it as the document history, otherwise use current revision. -{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} -{revisionhistory%}{revision}{date}{authorinitials?{authorinitials}}{revremark?{revremark}} - - {companyname} -{doctitle#}
- -[footer] -
- -[preamble] -# Preamble is not allowed in DocBook book so wrap it in a preface. - -Preface -| - - -[sect-dedication] - -| - - -[sect-colophon] - -| - - -[sect0] - -{title} -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -[sect4] - -{title} -| - - -endif::doctype-book[] - -ifdef::sgml[] -# -# Optional DocBook SGML. -# -# Most of the differences between DocBook XML and DocBook SGML boils -# down to the empty element syntax: SGML does not like the XML empty -# element <.../> syntax, use <...> instead. -# -[miscellaneous] -outfilesuffix=.sgml - -[header-declarations] - - -[tabledef-default] -colspec= - -[image-inlinemacro] - - - - - {1={target}} - - -[image-blockmacro] -
{title} -{title%} - - - - - {1={target}} - -{title#}
-{title%} - -# Inline macros -[xref-inlinemacro] -{0} -{2%} -[xref2-inlinemacro] -# <> -{2} -{2%} -[anchor-inlinemacro] - -[anchor2-inlinemacro] -# [[id,text]] - - -endif::sgml[] diff --git a/bin/fuzzypo b/bin/fuzzypo index db6e55e9..77ceafac 100755 --- a/bin/fuzzypo +++ b/bin/fuzzypo @@ -2,10 +2,21 @@ # vim: set sts=4 expandtab: # $1: es.po fr.po pt.po zh-cn.po zh-cn.po-best ... # -DPO="po" MSGATTR="msgattrib" +MSGCAT="msgcat --no-wrap -" # -echo "no-obsolete $1 `${MSGATTR} --no-obsolete $1 |grep ^msgid |sed 1d|wc -l`" -echo "untranslated $1 `${MSGATTR} --untranslated $1 |grep ^msgid |sed 1d|wc -l`" -echo "fuzzy $1 `${MSGATTR} --fuzzy $1 |grep ^msgid |sed 1d|wc -l`" +TOTAL="$(${MSGATTR} --no-obsolete "$1" |grep ^msgid |sed 1d|wc -l)" +UNTRANSLATED="$(${MSGATTR} --untranslated "$1" |grep ^msgid |sed 1d|wc -l)" +FUZZY="$(${MSGATTR} --fuzzy "$1" |grep ^msgid |sed 1d|wc -l)" +COMPLETED="$(( ( TOTAL - UNTRANSLATED - FUZZY ) * 100 / TOTAL ))" +TRIVIAL="$(${MSGATTR} --no-obsolete "$1" |${MSGCAT} |grep -i -c '^msgid *"http')" +BASELINE="$(( TRIVIAL * 100 / TOTAL ))" +MINCOMP="$(( ( 60 * TRIVIAL + 40 * TOTAL ) / TOTAL ))" +echo "$1 $TOTAL strings -- TOTAL msgstr to translate" +echo "$1 $UNTRANSLATED strings -- EMPTY msgstr" +echo "$1 $FUZZY strings -- FUZZY msgstr" +echo "$1 $COMPLETED % -- COMPLETED translation" +echo "$1 $TRIVIAL strings -- msgid "http..." (considered TRIVIAL)" +echo "$1 $BASELINE % -- TRIVIAL portion" +echo "$1 $MINCOMP % -- MINIMUM translation portion to activate (net 40%)" echo diff --git a/bin/help.conf b/bin/help.conf deleted file mode 100644 index 1ac7580c..00000000 --- a/bin/help.conf +++ /dev/null @@ -1,213 +0,0 @@ -# AsciiDoc help file. -# -# INI section format, each section contains a topic. -# Displayed with 'asciidoc --help sectionname' command. -# - -# -# Default help topic. -# -[default] - -Man page: asciidoc --help manpage -Syntax: asciidoc --help syntax - -[manpage] - - -NAME - - asciidoc - converts an AsciiDoc text file to DocBook, HTML or LinuxDoc - -SYNOPSIS - - asciidoc [OPTIONS] FILE - -DESCRIPTION - - The asciidoc(1) command translates the AsciiDoc text file FILE to a - DocBook, HTML or LinuxDoc file. If FILE is - then the standard input is - used. - -OPTIONS - - -a, --attribute=ATTRIBUTE - Define or delete document attribute. ATTRIBUTE is formatted like - NAME=VALUE. Command-line attributes take precedence over - document and configuration file attributes. Alternate acceptable - forms are NAME (the VALUE defaults to an empty string); NAME! - (delete the NAME attribute); NAME@ (do not override document or - configuration file attributes). Values containing spaces should - be enclosed in double-quote characters. This option may be - specified more than once. - - -b, --backend=BACKEND - Backend output file format: docbook, xhtml11 or html4. Defaults - to xhtml11. - - -f, --conf-file=CONF_FILE - Use configuration file CONF_FILE.Configuration files processed - in command-line order (after implicit configuration files). This - option may be specified more than once. - - -d, --doctype=DOCTYPE - Document type: article, manpage or book. The book document type - is only supported by the docbook backend. Default document type - is article. - - -c, --dump-conf - Dump configuration to stdout. - - -h, --help[=TOPIC] - Print help TOPIC. --help=topics will print a list of help - topics, --help=syntax summarizes AsciiDoc syntax, --help=manpage - prints the AsciiDoc manpage. - - -e, --no-conf - Exclude implicitly loaded configuration files except for those - named like the input file (infile.conf and infile-backend.conf). - - -s, --no-header-footer - Suppress document header and footer output. - - -o, --out-file=OUT_FILE - Write output to file OUT_FILE. Defaults to the base name of - input file with backend extension. If the input is stdin then - the outfile defaults to stdout. If OUT_FILE is - then the - standard output is used. - - -n, --section-numbers - Auto-number HTML article section titles. Synonym for -a - numbered. - - --unsafe - Disable safe mode. Safe mode is enabled by default, disabling it - is potentially dangerous. - - -v, --verbose - Verbosely print processing information and configuration file - checks to stderr. - - --version - Print program version number. - -EXIT STATUS - - 0 - Success - - 1 - Failure (syntax or usage error; configuration error; document - processing failure; unexpected error). - -BUGS - - See the AsciiDoc distribution BUGS file. - -AUTHOR - - Written by Stuart Rackham, - -RESOURCES - - SourceForge: http://sourceforge.net/projects/asciidoc/ - - Main web site: http://www.methods.co.nz/asciidoc/ - -COPYING - - Copyright (C) 2002-2008 Stuart Rackham. Free use of this software is - granted under the terms of the GNU General Public License (GPL). - -[syntax] - -AsciiDoc Markup Syntax Summary -============================== - -A summary of the most often used markup. -For a complete reference see the 'AsciiDoc User Guide'. - -Text formatting ---------------- - *bold text* (boldface font) - _emphasized text_ (normally italics) -- disabled - 'emphasized text' -- disabled together with __ - +monospaced text+ (proportional font) - `monospaced text` - -Document links --------------- - [[id]] (define link target) - <> (link to target id) - link:filename#id[caption] (link to external HTML file) - -URLs ----- - Use normal URL and email addess syntax or: - - http:address[caption] (link to web page) - mailto:address[caption] (link to mail recipient) - -Images ------- - image:filename[caption] (inline image) - image::filename[caption] (block image) - -Document header ---------------- - - The Document Title - ================== - author (optional) - revision, date (optional) - -Section title underlines ------------------------- - Level 0 (document title): ====================== - Level 1: ---------------------- - Level 2: ~~~~~~~~~~~~~~~~~~~~~~ - Level 3: ^^^^^^^^^^^^^^^^^^^^^^ - Level 4 (bottom level): ++++++++++++++++++++++ - -Delimited blocks ----------------- -Delimiters must begin at left margin. - - ------------------- - listing block - ------------------- - - ................... - literal block - ................... - - ******************* - sidebar block - ******************* - - [style, author, cite] (optional) - ___________________ - quote block - ___________________ - - =================== - example block - =================== - - /////////////////// - comment block - /////////////////// - -More block elements -------------------- - [attributes list] (Note 1) - .Block title (Note 1) - // Comment line (Note 1) - include::filename[] (Note 1) - -Note 1: Begin at the left margin. - -More inline elements --------------------- - footnote:[footnote text] (document footnote) - diff --git a/bin/replace0 b/bin/replace0 new file mode 100644 index 00000000..c73cd157 --- /dev/null +++ b/bin/replace0 @@ -0,0 +1,8 @@ +# buggy original xml +s,”,”,g +# manpages to use literal conversion +s, *\([^<]*\) *\([^<]*\) *,\1(\2),g +# Now GTK instead of GTK+ +s,GTK+,GTK,g +# <> -> emphasis: +s,<\([^& ]*\)>,\1,g diff --git a/bin/replace1 b/bin/replace1 deleted file mode 100644 index 5e8d7793..00000000 --- a/bin/replace1 +++ /dev/null @@ -1,2 +0,0 @@ -# manpages -s,\([^<]*\)(\([^)]*\)),\1\2,g diff --git a/bin/replace_package b/bin/replace_package index ceff1ca1..ad5e8a1c 100644 --- a/bin/replace_package +++ b/bin/replace_package @@ -1,3 +1,4 @@ -# This is autogenerated by Makefile. Update this with "make rawxml" +# This is to keep XML source stable. (TO BE USED) s/@libpoppler@/libpoppler95/g s/@libgstreamer@/libgstreamer1.0-0/g +s/@libstdc++-dev@/libstdc++-10-dev/g diff --git a/common.ent b/common.ent deleted file mode 100644 index b7b81416..00000000 --- a/common.ent +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/datadatepop.ent b/datadatepop.ent deleted file mode 100644 index a55b8313..00000000 --- a/datadatepop.ent +++ /dev/null @@ -1 +0,0 @@ - diff --git a/datadatesize.ent b/datadatesize.ent deleted file mode 100644 index b0276c55..00000000 --- a/datadatesize.ent +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/debian/all.install-in b/debian/all.install-in index 64f7af2c..bccecbe2 100644 --- a/debian/all.install-in +++ b/debian/all.install-in @@ -1,4 +1,4 @@ -tmp/debian-reference.@@.txt.gz usr/share/debian-reference/ -tmp/debian-reference.@@.epub usr/share/debian-reference/ -tmp/debian-reference.@@.pdf usr/share/debian-reference/ -tmp/*.@@.html usr/share/debian-reference/ +build/debian-reference.@@.txt.gz usr/share/debian-reference/ +build/debian-reference.@@.epub usr/share/debian-reference/ +build/debian-reference.@@.pdf usr/share/debian-reference/ +build/*.@@.html usr/share/debian-reference/ diff --git a/debian/changelog b/debian/changelog index 4976db1b..31c34850 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debian-reference (2.79) UNRELEASED; urgency=medium + + * Clean up build scripts. + + -- Osamu Aoki Thu, 27 May 2021 10:49:41 +0900 + debian-reference (2.78) unstable; urgency=medium [ xiao sheng wen (肖盛文) ] diff --git a/debian/debian-reference-common.install b/debian/debian-reference-common.install index 7693bf55..27fd5850 100644 --- a/debian/debian-reference-common.install +++ b/debian/debian-reference-common.install @@ -2,6 +2,6 @@ bin/debian-reference usr/bin bin/mkindexhtml usr/share/debian-reference-common debian/debian-reference-common.desktop usr/share/applications debian/debian-reference.png usr/share/pixmaps -tmp/.htaccess usr/share/debian-reference -tmp/debian-reference.css usr/share/debian-reference -tmp/images/* usr/share/debian-reference/images +build/.htaccess usr/share/debian-reference +build/debian-reference.css usr/share/debian-reference +build/images/* usr/share/debian-reference/images diff --git a/pkgsize.ent b/pkgsize.ent deleted file mode 100644 index 27619062..00000000 --- a/pkgsize.ent +++ /dev/null @@ -1,682 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/popcon.ent b/popcon.ent deleted file mode 100644 index 4d8d163b..00000000 --- a/popcon.ent +++ /dev/null @@ -1,685 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xslt/table.xsl b/xslt/table.xsl index c00e1a40..9c245980 100644 --- a/xslt/table.xsl +++ b/xslt/table.xsl @@ -12,7 +12,8 @@ Process raw XML file: --> -ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !#$%()=-~^|\/+*,.?;:@`"'@-&-@><’ + +ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789é !#$%()=-~^|\/+*,.?;:@`"'&><’ abcdefghijklmnopqrstuvwxyzabcdefghij diff --git a/xslt/tablet.xsl b/xslt/tablet.xsl index 404d6c40..8cb9db40 100644 --- a/xslt/tablet.xsl +++ b/xslt/tablet.xsl @@ -12,7 +12,8 @@ Process raw XML file: --> -ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !#$%()=-~^|\/+*,.?;:@`"'@-&-@><’ + +ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789é !#$%()=-~^|\/+*,.?;:@`"'&><’ abcdefghijklmnopqrstuvwxyzabcdefghij @@ -183,6 +184,13 @@ Process raw XML file: + + + + DUMMY + + + diff --git a/xslt/urls.xsl b/xslt/urls.xsl index fef43305..27fcd4a6 100644 --- a/xslt/urls.xsl +++ b/xslt/urls.xsl @@ -7,7 +7,8 @@ Extract URL and link location name for &url-***; for use in urls.ent -ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !#$%()=-~^|\/+*,.?;:@`"'&><’ + +ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789é !#$%()=-~^|\/+*,.?;:@`"'&><’ abcdefghijklmnopqrstuvwxyzabcdefghij