Skip to content
Commits on Source (3)
......@@ -4,6 +4,16 @@ debian-edu-doc (2.10.11) UNRELEASED; urgency=medium
* ITIL manual:
- Norwegian Bokmål: Allan Nordhøy.
[ Wolfgang Schweer ]
* documentation/common/Makefile.common:
- Set timestamps for PDF and EPUB manuals to the start of Unix time. Also,
in case of EPUB files the generated article ID is unique and needs to be
tweaked and (beeing a zip file) strip-nondeterminism is used to get rid of
the remaining difference.
With these changes the manuals can be built reproducibly.
* debian/control:
- Add strip-nondeterminism to Build-Depends-Indep.
-- Holger Levsen <holger@debian.org> Sat, 01 Jan 2019 00:00:00 +0100
debian-edu-doc (2.10.10) unstable; urgency=medium
......
......@@ -13,6 +13,7 @@ Build-Depends-Indep: dblatex,
lmodern,
po4a,
poxml,
strip-nondeterminism,
texlive-lang-cyrillic,
texlive-lang-european,
texlive-lang-french,
......
......@@ -10,7 +10,7 @@ LANGUAGES = $(subst $(name).,,$(subst .po,,$(wildcard *.po)))
# Program name and option
DBTOEPUB = dbtoepub
XP = xsltproc --nonet --novalid --xinclude ../common/html.xsl
DBLATEX = dblatex -T db2latex -b xetex -p ../common/dblatex.xsl
DBLATEX = SOURCE_DATE_EPOCH=0 SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 dblatex -T db2latex -b xetex -p ../common/dblatex.xsl
SED_JA_REGEX = 's/dbtimestamp/dbtimestamp\ format=\"Y\ 年\ m\ 月\ d\ 日\"/'
# Use Make internal function 'subst': substitute -manual with nothing to get
......@@ -63,6 +63,14 @@ build-epub:
# build the English EPUB version
echo "Creating epub for en"
$(DBTOEPUB) $(name).xml
unzip -q $(name).epub -d epub
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/content.opf
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/toc.ncx
find epub -exec touch -d @0 {} \;
rm $(name).epub
zip -q -r -o $(name).epub epub/
rm -rf epub/
strip-nondeterminism -t zip $(name).epub
# build all other EPUB versions
-for LINGUA in $(LANGUAGES) ; do \
echo "Creating epub for $$LINGUA"; \
......@@ -105,10 +113,26 @@ endif
ifndef LINGUA
epub:
$(DBTOEPUB) $(name).xml
unzip -q $(name).epub -d epub
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/content.opf
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/toc.ncx
find epub -exec touch -d @0 {} \;
rm $(name).epub
zip -q -r -o $(name).epub epub/
rm -rf epub/
strip-nondeterminism -t zip $(name).epub
else
epub:
po4a --translate-only $(name).$(LINGUA).xml po4a.cfg
$(DBTOEPUB) $(name).$(LINGUA).xml
unzip -q $(name).$(LINGUA).epub -d epub
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/content.opf
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/toc.ncx
find epub -exec touch -d @0 {} \;
rm $(name).$(LINGUA).epub
zip -q -r -o $(name).$(LINGUA).epub epub/
rm -rf epub/
strip-nondeterminism -t zip $(name).$(LINGUA).epub
endif
install: build
......@@ -154,6 +178,16 @@ install: build
fi ; \
if [ -e $(name).$$f.epub ] ; then \
cp $(name).$$f.epub $$LANGPATH/$(name).epub ; \
cd $$LANGPATH ; \
unzip -q $(name).epub -d epub ; \
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/content.opf ; \
sed -i 's#_idm[0-9]\{14\}#_idm1234567#' epub/OEBPS/toc.ncx ; \
find epub -exec touch -d @0 {} \; ; \
rm $(name).epub ; \
zip -q -r -o $(name).epub epub/ ; \
rm -rf epub/ ; \
strip-nondeterminism -t zip $(name).epub ; \
cd - ; \
fi ; \
done
rm $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/$(name)-images/*.pdf ; \
......