File: rules

package info (click to toggle)
mypaint 2.0.1-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,844 kB
  • sloc: python: 43,893; cpp: 6,931; xml: 2,475; sh: 473; makefile: 25
file content (51 lines) | stat: -rwxr-xr-x 1,213 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
#!/usr/bin/make -f
# -*- makefile -*-
#  # Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

# Hardening
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# In fact, we are not using pybuild at all.
#export PYBUILD_NAME=mypaint
export PYBUILD_DESTDIR_python3=debian/tmp/

# Python variable
PYTHON = python3

# For tests, as suggested by upstream
export XDG_CACHE_HOME := $(CURDIR)/fakehome/

%:
	dh $@ --buildsystem=pybuild

override_dh_clean:
	# As suggested by upstream
	$(PYTHON) setup.py clean --all
	rm -f lib/_mypaintlib*.so
	dh_clean

override_dh_auto_build:
	# As suggested by upstream
	$(PYTHON) setup.py build

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# Known to be failing, just ignore failure for now
	# Suggested by upstream, disabled due to usage of obsolete nosetests
	#$(PYTHON) setup.py nosetests \
	#    --ignore-files="(objfactory)|(widgets).py"
	# Heavy tests including C++ part
	-$(PYTHON) setup.py test
endif

override_dh_auto_install:
	# From AUR package
	$(PYTHON) setup.py install \
	        --root=$(CURDIR)/debian/tmp/ \
	        --prefix=/usr/ \
		--skip-build

override_dh_installchangelogs:
	dh_installchangelogs Changelog.md