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
|
#!/usr/bin/make -f
# export DH_VERBOSE := 1
POLICY_TARGETS := binary binary-arch binary-indep build build-arch \
build-indep clean
.PHONY: $(POLICY_TARGETS)
$(POLICY_TARGETS):
dh $@ --with python2
# Tell each dh_auto_* tool which buildsystem is needed.
override_dh_auto_clean:: override_%:
$* --buildsystem=makefile -- reallyclean
override_dh_auto_build: override_%:
$* --buildsystem=makefile -- prepare
$* --buildsystem=python_distutils
override_dh_auto_install:: override_%:
$* --buildsystem=python_distutils
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
rm -fr tests_tmp
# Disable unit until they migrate to python-wxgtk3.0.
# ADTTMP=. sh debian/tests/unittests
endif
override_dh_auto_clean::
rm -rf tests_tmp
# Translate upstream changelog to text for dh_installchangelogs.
# Upstream "make clean" will remove it.
CHANGES.txt:
python changes.in/make.py text > $@
override_dh_auto_build: CHANGES.txt
# Files extracted from thirdparty tarballs by "make prepare" should be
# deleted with "make nuke", but upstream implementation uses the local
# subversion repository so we have to do an ugly explicit list.
# Information about thirdparty is centralized in debian/copyright.
override_dh_auto_clean::
rm -f -r taskcoachlib/thirdparty/aui
rm -f taskcoachlib/thirdparty/customtreectrl.py
rm -f -r taskcoachlib/thirdparty/desktop
rm -f -r taskcoachlib/thirdparty/gntp
rm -f taskcoachlib/thirdparty/hypertreelist.py
rm -f taskcoachlib/thirdparty/lockfile.py
rm -f -r taskcoachlib/thirdparty/ntlm
rm -f taskcoachlib/thirdparty/pybonjour.py
rm -f taskcoachlib/thirdparty/wmi.py
rm -f -r taskcoachlib/thirdparty/wxScheduler
# Generated file, see Files-Excluded stanza in copyright file.
override_dh_auto_clean::
rm -f i18n.in/messages.pot
# Provide an icon for the menu file.
XPM_ICON := icons.in/taskcoach.xpm
$(XPM_ICON): %.xpm: %.png
gm convert -resize 32x32 $< $@
override_dh_auto_build: $(XPM_ICON)
override_dh_auto_install::
dh_install $(XPM_ICON) usr/share/pixmaps
override_dh_auto_clean::
rm -f $(XPM_ICON)
# Upstream provides the main executable with a .py suffix.
EXE_DIR := debian/taskcoach/usr/bin
DESKTOP := debian/taskcoach/usr/share/applications/taskcoach.desktop
APPDATA := debian/taskcoach/usr/share/appdata/taskcoach.appdata.xml
override_dh_auto_install::
cd $(EXE_DIR) && mv taskcoach.py taskcoach
sed --in-place 's/Exec=taskcoach\.py/Exec=taskcoach/' $(DESKTOP)
sed --in-place 's/<binary>taskcoach\.py/<binary>taskcoach/' $(APPDATA)
# Avoid compressing the TODO list, provided in the taskcoach format.
override_dh_compress:
dh_compress -Xusr/share/doc/taskcoach/TODO.tsk
|