File: rules

package info (click to toggle)
graph-tool 2.45%2Bds-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,640 kB
  • sloc: cpp: 72,219; python: 26,938; makefile: 802; xml: 101; sh: 29
file content (71 lines) | stat: -rwxr-xr-x 1,812 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

export VERSION_COMMENT=\"(Debian $(DEB_VERSION))\"

PY3DOTVERSION=$(shell py3versions -dv)
PY3DOTLESSVERSION=$(shell py3versions -dv | sed -e 's@\.@@')

DEB_PYTHON_VERSION=$(PY3DOTVERSION)
DEB_PYTHON_SITE_PKG=/usr/lib/python$(PY3DOTVERSION)/dist-packages

BUILDDIR=_BUILD

##ifneq (,$(filter $(DEB_HOST_ARCH), mips64el))
##CPPFLAGS += -mxgot --param ggc-min-expand=10
##endif

default:
	@uscan --no-conf --dehs --report || true

%:
	dh $@ --with python3 --builddirectory=$(BUILDDIR)

override_dh_auto_configure:
	## see d/patches/upstream-fix-autotools-automake-doc-missing.patch
	cp -vprd -t doc debian/adhoc/provide/doc/*
	PYTHON_VERSION=$(DEB_PYTHON_VERSION) \
	PYTHON_SITE_PKG=$(DEB_PYTHON_SITE_PKG) \
		dh_auto_configure -- \
			--with-sparsehash-prefix=google \
			--with-boost-python=boost_python$(PY3DOTLESSVERSION)

override_dh_auto_test:
	true

override_dh_auto_install:
	dh_auto_install
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	@echo "TEST STARTED" `date -u`
	$(RM) $(BUILDDIR)/test.png
	PYTHONPATH=$(CURDIR)/debian/tmp/$(DEB_PYTHON_SITE_PKG) \
		python3 -c "\
from graph_tool.all import *; \
show_config(); \
g = random_graph(10, lambda: 5, directed=False); \
graph_draw(g, output='$(BUILDDIR)/test.png'); \
"
	@echo "TEST ENDED" `date -u`
endif

override_dh_install:
	dh_install -X.la

override_dh_installchangelogs:
	dh_installchangelogs --keep ChangeLog

override_dh_missing:
	dh_missing -X.la --list-missing

override_dh_dwz:
	dh_dwz --no-dwz-multifile -Xlibgraph_tool_core -Xlibgraph_tool_inference

execute_before_dh_gencontrol:
	dh_numpy3

override_dh_clean:
	find debian/adhoc/provide/doc/ -type f | sed 's@debian/adhoc/provide/@@g' | xargs rm -vf
	dh_clean