Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
8
9 include /usr/share/dpkg/architecture.mk
10
11 ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
12 PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
13 PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER)$(if $(PERL5LIB),:$(PERL5LIB))
14 export PERL5LIB
15 endif
16
17 PYVERS=$(shell py3versions --supported --version)
18 CMAKE_OPTS = \
19 -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
20 -DENABLE_DOCS=ON \
21 -DENABLE_OSCAP_REMEDIATE_SERVICE=OFF \
22 -DENABLE_PERL=ON \
23 -DPYTHON_EXECUTABLE=/usr/bin/python$$V \
24
25 override_dh_auto_clean:
26 for V in $(PYVERS); do \
27 dh_auto_clean --builddir=build-py$$V ; \
28 done
29
30 override_dh_auto_configure:
31 for V in $(PYVERS); do \
32 dh_auto_configure --builddir=build-py$$V -- \
33 $(CMAKE_OPTS) ; \
34 done
35
36 override_dh_auto_build:
37 for V in $(PYVERS); do \
38 dh_auto_build --builddir=build-py$$V ; \
39 done
40
41 override_dh_auto_install:
42 # Move Python files to separate folders so they don't overwrite
43 # each other at install time.
44 for V in $(PYVERS); do \
45 dh_auto_install --builddir=build-py$$V ; \
46 mv ${CURDIR}/debian/tmp/usr/lib/python3 ${CURDIR}/debian/tmp/usr/lib/python$$V ; \
47 chmod 0644 ${CURDIR}/debian/tmp/usr/lib/python$$V/dist-packages/openscap_py.py ; \
48 chmod 0644 ${CURDIR}/debian/tmp/usr/lib/python$$V/dist-packages/openscap_api.py ; \
49 done
50
51 find debian/tmp -name "*.la" -delete
52 rm -rf $(CURDIR)/debian/tmp/usr/share/openscap/cpe
53 $(RM) $(CURDIR)/debian/tmp/usr/share/doc/openscap/html/*.md5 \
54 $(CURDIR)/debian/tmp/usr/share/doc/openscap/html/*.map
55
56 override_dh_python3:
57 dh_python3 -popenscap-utils -ppython3-openscap --shebang=/usr/bin/python3
58
59 override_dh_installchangelogs:
60 dh_installchangelogs NEWS
61
62 # Skip tests when building for 'all'.
63 override_dh_auto_test-indep:
64
65 override_dh_auto_test-arch:
66 for V in $(PYVERS); do \
67 dh_auto_test --no-parallel --builddir=build-py$$V ; \
68 done
69
70 %:
71 dh $@ --with python3