File: rules

package info (click to toggle)
opencamlib 2023.01.11-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,800 kB
  • sloc: cpp: 8,722; python: 5,530; sh: 604; javascript: 310; makefile: 209
file content (41 lines) | stat: -rwxr-xr-x 1,391 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
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem=cmake

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

extra_flags += \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Wall -fpermissive $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
-DCMAKE_C_FLAGS="-Wall -fpermissive $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
-DCMAKE_SHARED_LINKER_FLAGS="$(shell dpkg-buildflags --get LDFLAGS)" \
-DMY_VERSION=$(DEB_VERSION) \
-DUSE_PY_3="ON" \
-DPYTHON_EXECUTABLE="$(shell command -v python3)" \
-DPYTHON_VERSION_SUFFIX=3

COMPONENTS = cxx py

override_dh_auto_configure:
	dh_auto_configure --builddirectory=obj-cxx/ -- $(extra_flags) -DBUILD_PY_LIB=OFF -DBUILD_CXX_LIB=ON -DBUILD_DOC=ON
	dh_auto_configure --builddirectory=obj-py/ -- $(extra_flags) -DBUILD_PY_LIB=ON -DBUILD_DOC=OFF

override_dh_auto_build-arch:
	$(foreach comp,$(COMPONENTS),dh_auto_build --builddirectory=obj-$(comp)/;)

override_dh_auto_build-indep:
	dh_auto_build --builddirectory=obj-cxx/ -- doc

override_dh_auto_test:
	$(foreach comp,$(COMPONENTS),dh_auto_test --builddirectory=obj-$(comp)/;)

override_dh_auto_install-arch:
	$(foreach comp,$(COMPONENTS),dh_auto_install --builddirectory=obj-$(comp)/;)

# No-op, installed using opencamlib-doc.docs
override_dh_auto_install-indep:

override_dh_auto_clean:
	rm -rf obj-*/