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 86 87 88 89 90 91 92 93 94 95
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
package=emacspeak
debbase := $(shell pwd)/debian
debtmp := $(debbase)/$(package)
eldir := usr/share/emacs/site-lisp/$(package)
deblsp := $(debtmp)/$(eldir)
%:
dh $@
override_dh_auto_build-arch:
$(MAKE) TCL_VERSION="" --directory servers/linux-espeak
override_dh_auto_build-indep:
echo $(shell dpkg-parsechangelog -c1 | grep ^Version: | perl -p -e 's/Version: //') \
> debian_version
cd servers/python && epydoc -o httpspeaker-html *.py
# Stupid enough, the output of docbook2html converts entities to iso-8859-1 chars.
# Converting the resulting files to UTF-8 as that seems a better default.
# Probably this can improved with the right call to a proper docbook2html converter
cd user-guide && docbook2html --nochunks espk-article.sgml && \
iconv --from-code=iso-8859-1 --to-code=utf-8 espk-article.html > \
tmp.html && \
mv tmp.html espk-article.html
# Upstream doesn't ship a changelog file but NEWS-* basically contain what is needed
# so cat that all together. Not 100% elegant, but it will do for now.
# Note: the loop is to sort 8 and 9 before the rest
echo > changelog
for release in 8 9 1 2 3 ; do \
cat etc/NEWS-$${release}* >> changelog ; \
done
cat etc/NEWS >> changelog
override_dh_auto_install:
dh_install
override_dh_auto_clean:
debconf-updatepo
# Call subdirectories directly because lisp/info is removed so "make clean" in ~/
# doesn't work and clean should also work when patches are not applied
$(MAKE) --directory lisp clean
$(MAKE) --directory servers/linux-espeak clean
# the following items should be done by the get-orig-source target, but
# leave them here just in case we might not need that target in the future
# the sources included some byte-compiled file by mistake
find . -name \*.elc -delete
find . -name \*.pyc -delete
find . -name \*.pyo -delete
# patches are already applied and don't need to go in
rm -rf lisp/g-client/patches
# documentation is generated, make sure we don't use the shipped stuff
rm -rf servers/python/doc
rm -rf servers/python/httpspeaker-html
dh_clean
override_dh_fixperms:
# Only fix the following in the indep case
# scripts and speech servers should be executable
if [ -d $(deblsp) ] ; then \
chmod 644 `find $(deblsp) -type f`; \
chmod 644 $(debtmp)/usr/share/doc/emacspeak/examples/tables.html ; \
chmod 755 $(deblsp)/etc/*.pl \
$(deblsp)/etc/*2html \
$(deblsp)/etc/*2text \
$(deblsp)/lisp/g-client/python/contacts.py \
$(deblsp)/servers/32-outloud \
$(deblsp)/servers/dtk-exp \
$(deblsp)/servers/dtk-soft \
$(deblsp)/servers/espeak \
$(deblsp)/servers/outloud \
$(deblsp)/servers/python/HTTPSpeaker.py \
$(deblsp)/servers/speech-server \
$(deblsp)/servers/ssh-dtk-exp \
$(deblsp)/servers/ssh-outloud ; \
fi
dh_fixperms
override_dh_compress:
# FAQ/HELP/NEWS can be called from emacspeak command, don't compress
dh_compress -XFAQ -XHELP -XNEWS
get-orig-source:
-uscan --rename --force-download
|