File: rules

package info (click to toggle)
python-greenlet 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 924 kB
  • sloc: cpp: 4,799; python: 2,676; ansic: 1,077; makefile: 153; asm: 120; sh: 34
file content (42 lines) | stat: -rwxr-xr-x 1,078 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
#!/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,sphinxdoc --buildsystem=pybuild

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

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

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_clean override_dh_auto_install \
	override_dh_auto_test override_dh_compress