File: rules

package info (click to toggle)
graphite2 1.3.14-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,588 kB
  • sloc: cpp: 14,738; cs: 1,998; python: 1,737; ansic: 1,673; perl: 184; xml: 123; sh: 104; makefile: 62
file content (54 lines) | stat: -rwxr-xr-x 1,447 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
#!/usr/bin/make -f

export DPKG_EXPORT_BUILDFLAGS = 0
include /usr/share/dpkg/architecture.mk

# https://github.com/silnrsi/graphite/issues/96
ifeq "$(DEB_HOST_ARCH)" "arm64"
export CXX := g++-14
endif

ifeq "$(DEB_HOST_ARCH)" "ppc64el"
export CXX := g++-14
endif

ifeq "$(DEB_HOST_ARCH)" "loong64"
export CXX := g++-14
endif

%:
	dh $@ --with python3 --buildsystem=cmake --builddirectory=build

override_dh_auto_build-indep:
	@echo "Building docs"
	dh_auto_build --no-parallel -- docs

override_dh_auto_install-arch:
	dh_auto_install -a

override_dh_auto_install-indep:

override_dh_install-indep:
	set -e ; for v in `py3versions -v -s`; do \
		python$$v setup.py -v install --prefix=/usr --root=$(CURDIR)/debian/python3-graphite2; \
	done

override_dh_auto_test: export LD_LIBRARY_PATH := $(CURDIR)/build/src
override_dh_auto_test:
	set -e; if [ -f ./build/src/libgraphite2.so.3 ]; then \
		dh_auto_test; \
	fi

override_dh_auto_clean:
	-find . -name "CTestCostData.txt" | xargs rm
	-find . -name "LastTest.log"  | xargs rm
	rm -f tests/graphite.pyc
	rm -rf tests/__pycache__
	rm -rf python/graphite2/__pycache__
	rm -rf python/graphite2.egg-info
	dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE:STRING=Release -DGRAPHITE2_NTRACING:BOOL=ON -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=$(shell which python3)
	find . -type f ! -name "rules" ! -name "changelog" \
		-exec sed -i -e 's/\-O3//g' {} \;