1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/usr/bin/make -f
DOCDIR=debian/debian-handbook/usr/share/doc/debian-handbook/html
VERSION=$(shell sed -n -e 's|.*<productnumber>\(.*\)</productnumber>.*|\1|p' en-US/Book_Info.xml)
LANGS=$(shell echo [a-z][a-z]-[A-Z][A-Z])
%:
dh $@
override_dh_auto_build:
set -e; for lang in $(LANGS); do \
./build/build-html --lang=$$lang; \
done
override_dh_auto_install:
mkdir -p $(DOCDIR)
for lang in $(LANGS); do \
mv publish/$$lang/Debian/$(VERSION)/html/debian-handbook $(DOCDIR)/$$lang; \
done
# Drop some useless files
rm -f $(DOCDIR)/*/images/chap-*.png # Chapter pictures only used in PDF
rm -f $(DOCDIR)/*/images/cover.png # Cover picture (only used in PDF/ePub)
rm -f $(DOCDIR)/*/images/*.dia # Sources of diagrams
# Deduplicate the remaining files
rdfind -makehardlinks true -makeresultsfile false $(DOCDIR)/en-US $(DOCDIR)
override_dh_auto_clean:
publican clean
.PHONY: build
|