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
|
#!/usr/bin/make -f
#
# (C) 1999-2016 Roland Rosenfeld <roland@debian.org>
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_OPTIONS=-v
DEBDIR=`pwd`/debian/fig2dev
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export FIG2DEV_RGBFILE = $(shell pwd)/fig2dev/rgb.txt
%:
dh $@ --with autoreconf
override_dh_auto_configure:
# backup version.m4:
if ! test -e version.m4.dh-orig; then \
cp -f version.m4 version.m4.dh-orig; \
fi
dh_auto_configure -- --enable-transfig
override_dh_auto_build:
dh_auto_build
(cd transfig/doc; \
../../fig2dev/fig2dev -L latex trans.fig > trans.tex; \
latex manual; \
latex manual; \
dvips -o manual.ps manual.dvi; \
ps2pdf manual.ps)
# uudecode fig2mpdf documentation:
(cd fig2mpdf/doc && perl uudecode *.uue)
(cd fig2mpdf/doc && $(MAKE))
# strip /ID from sample-presentation.pdf because this is includes current
# directory and makes package non reproducible
(cd fig2mpdf/doc \
&& grep -av '^/ID \[\(<[0-9A-F]\{32\}>\) \1]$$' sample-presentation.pdf \
> sample-presentation.pdf_without_id \
&& mv -f sample-presentation.pdf_without_id sample-presentation.pdf)
override_dh_clean:
dh_clean
rm -f transfig/doc/trans.tex transfig/doc/*.aux transfig/doc/*.log \
transfig/doc/*.dvi transfig/doc/*.ps transfig/doc/*.pdf
rm -f fig2mpdf/doc/*.gif fig2mpdf/doc/*.pdf fig2mpdf/doc/*.jpg
[ ! -f fig2mpdf/doc/Makefile ] || (cd fig2mpdf/doc && $(MAKE) clean)
# restore version.m4:
if test -e version.m4.dh-orig; then \
mv -f version.m4.dh-orig version.m4; \
fi
override_dh_auto_install:
dh_auto_install --destdir=$(DEBDIR)
override_dh_installchangelogs:
dh_installchangelogs -k CHANGES
override_dh_compress:
dh_compress -X.pdf
|