Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DPKG_EXPORT_BUILDFLAGS = 0
4 include /usr/share/dpkg/architecture.mk
5
6 %:
7 dh $@ --with python3 --buildsystem=cmake --builddirectory=build
8
9 override_dh_auto_build-indep:
10 @echo "Building docs"
11 dh_auto_build --no-parallel -- docs
12
13 override_dh_auto_install-arch:
14 dh_auto_install -a
15
16 override_dh_auto_install-indep:
17
18 override_dh_install-indep:
19 set -e ; for v in `py3versions -v -s`; do \
20 python$$v setup.py -v install --prefix=/usr --root=$(CURDIR)/debian/python3-graphite2; \
21 done
22
23 override_dh_auto_test: export LD_LIBRARY_PATH := $(CURDIR)/build/src
24 override_dh_auto_test:
25 set -e; if [ -f ./build/src/libgraphite2.so.3 ]; then \
26 dh_auto_test; \
27 fi
28
29 override_dh_auto_clean:
30 -find . -name "CTestCostData.txt" | xargs rm
31 -find . -name "LastTest.log" | xargs rm
32 rm -f tests/graphite.pyc
33 rm -rf tests/__pycache__
34 rm -rf python/graphite2/__pycache__
35 rm -rf python/graphite2.egg-info
36 dh_auto_clean
37
38 override_dh_auto_configure:
39 dh_auto_configure -- -DCMAKE_BUILD_TYPE:STRING=Release -DGRAPHITE2_NTRACING:BOOL=ON -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DPYTHON_EXECUTABLE=$(shell which python3)
40 find . -type f ! -name "rules" ! -name "changelog" \
41 -exec sed -i -e 's/\-O3//g' {} \;