File: rules

package info (click to toggle)
python-greenlet 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,032 kB
  • sloc: cpp: 5,045; python: 3,160; ansic: 1,125; makefile: 155; asm: 120; sh: 42
file content (44 lines) | stat: -rwxr-xr-x 1,152 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

%:
	dh $@ --with python3 --buildsystem=pybuild

ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
docs = {destdir}/usr/share/python-greenlet-doc/html
PYBUILD_AFTER_CLEAN = rm -rf $(docs)
PYBUILD_AFTER_INSTALL = \
	PYTHONPATH={destdir}/{install_dir} \
	{interpreter} -m sphinx -N -b html {dir}/docs/ $(docs)
export PYBUILD_AFTER_CLEAN PYBUILD_AFTER_INSTALL
endif

override_dh_auto_install:
	dh_auto_install
	if [ -d $(CURDIR)/debian/tmp/usr/include/python3.7/ ]; then \
		mv $(CURDIR)/debian/tmp/usr/include/python3.7/ \
		$(CURDIR)/debian/tmp/usr/include/python3.7m/ ; \
	fi
	find $(CURDIR)/debian/tmp/ -name core -type f -delete

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
  ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
	-dh_auto_test
  else
	dh_auto_test
  endif
endif

override_dh_compress:
	dh_compress -X.html

.PHONY: override_dh_auto_install override_dh_auto_test override_dh_compress