File: rules

package info (click to toggle)
taskcoach 1.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 32,188 kB
  • sloc: python: 72,373; makefile: 285; ansic: 120; xml: 34; sh: 16
file content (72 lines) | stat: -rwxr-xr-x 2,505 bytes parent folder | download
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
#!/usr/bin/make -f

%:
	dh $@ --with python2

override_dh_auto_clean::
# clean and reallyclean cannot run in parallel.
	$(MAKE) reallyclean
override_dh_auto_build: override_%:
# img2py needs an X display to convert images.
# Do not mix xvfb-run and parallelism.
	xvfb-run $(MAKE) -j1 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.
#	AUTOPKGTEST_TMP=. 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 -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/metainfo/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