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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#!/usr/bin/make -f
## ----------------------------------------------------------------------
## debian/rules : package script for debian-reference
## ----------------------------------------------------------------------
## ----------------------------------------------------------------------
## uncomment this to turn on verbose mode
#export DH_VERBOSE=1
## no-parallel to build with the cleaner log (it slows!)
#BUILDOPT:= --parallel
#BUILDOPT:= --no-parallel
## ----------------------------------------------------------------------
# Package building language choice
# (This should be updated with the maintainer approval)
#
MANUAL := debian-reference
LANGALL := en ja fr id it pt de zh-cn zh-tw es pt-br
LANGPO := ja fr id it pt de zh-cn zh-tw es pt-br
# languages to skip generation of PDF files (not used now)
#NOPDF := zh-cn zh-tw
NOPDF :=
## ----------------------------------------------------------------------
## Targets
%:
dh $@
override_dh_auto_build:
# Generate files for debhelper in debian/
cd $(CURDIR)/debian/ ; \
cp all.postinst-in $(MANUAL)-common.postinst ; \
cp all.postrm-in $(MANUAL)-common.postrm ; \
for XX in $(LANGALL) ; do \
cp all.postinst-in $(MANUAL)-$${XX}.postinst ; \
cp all.postrm-in $(MANUAL)-$${XX}.postrm ; \
case $$XX in \
en) LANGX="English" ;; \
de) LANGX="German" ;; \
fr) LANGX="French" ;; \
fi) LANGX="Finnish" ;; \
es) LANGX="Spanish" ;; \
id) LANGX="Indonesian" ;; \
it) LANGX="Italian" ;; \
ja) LANGX="Japanese" ;; \
pl) LANGX="Polish" ;; \
pt) LANGX="Portuguese (Portugal)" ;; \
pt-br) LANGX="Portuguese (Brazil)" ;; \
zh-tw) LANGX="Chinese (Traditional)" ;; \
zh-cn) LANGX="Chinese (Simplified)" ;; \
*) LANGX="$$x" ;; \
esac ; \
sed -e "s/@@/$$XX/g" < all.install-in >$(MANUAL)-$${XX}.install ; \
sed -e "s/@@/$$XX/g" < all.links-in >$(MANUAL)-$${XX}.links ; \
sed -e "s/@@/$$XX/g" -e "s/@LANG@/$$LANGX/g" < all.doc-base-in >$(MANUAL)-$${XX}.doc-base ; \
done
dh_auto_build $(BUILDOPT) -- \
"LANGALL=$(LANGALL)" \
"LANGPO=$(LANGPO)" \
"NOPDF=$(NOPDF)" \
all
override_dh_compress:
dh_compress -X.pdf
override_dh_auto_test:
# just in case backported to debhelper pre-13
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# error if shipped scripts have syntax error in them
sh -n bin/debian-reference
sh -n bin/mkindexhtml
endif
override_dh_auto_clean:
# Clean files for debhelper in debian/
-rm -f $(MANUAL)-common.postinst $(MANUAL)-common.postrm
-rm -f $(addsuffix .postinst, $(addprefix debian/$(MANUAL)-, $(LANGALL) common))
-rm -f $(addsuffix .postrm, $(addprefix debian/$(MANUAL)-, $(LANGALL) common))
-rm -f $(addsuffix .links, $(addprefix debian/$(MANUAL)-, $(LANGALL)))
-rm -f $(addsuffix .install, $(addprefix debian/$(MANUAL)-, $(LANGALL)))
-rm -f $(addsuffix .doc-base, $(addprefix debian/$(MANUAL)-, $(LANGALL)))
$(MAKE) "LANGALL=$(LANGALL)" "LANGPO=$(LANGPO)" clean
|