File: rules

package info (click to toggle)
elektra 0.8.14-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,940 kB
  • ctags: 10,632
  • sloc: ansic: 46,160; cpp: 33,391; sh: 2,577; python: 1,697; xml: 1,035; java: 760; makefile: 197; tcl: 32
file content (61 lines) | stat: -rwxr-xr-x 1,744 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
55
56
57
58
59
60
61
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PY3VER = $(shell py3versions -d -v)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
CMAKE_ARGS = -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
  -DTARGET_PLUGIN_FOLDER="elektra4" \
  -DPLUGINS="ALL" \
  -DTOOLS="ALL" \
  -DBUILD_STATIC=OFF \
  -DBINDINGS="ALL" \
  -DSWIG_EXECUTABLE="/usr/bin/swig3.0" \
  -DPython_ADDITIONAL_VERSIONS="$(PY3VER)" \
  -DGTEST_ROOT="/usr/src/gtest" \
  -DTARGET_DOCUMENTATION_HTML_FOLDER="share/doc/elektra-doc/html"
T = $(CURDIR)/teststmp
EMPTY =
SPACE = $(EMPTY) $(EMPTY)
COMMA_SPACE = ,$(SPACE)
PKGS_ALL_PLUGINS = $(subst $(SPACE),$(COMMA_SPACE),$(filter libelektra4-%,$(shell dh_listpackages)))

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

%:
	dh $@ --parallel --buildsystem=cmake --with lua,python3

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- $(CMAKE_ARGS)

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p "$(T)"
	cd obj-* && env HOME="$(T)" TMPDIR="$(T)" ctest --output-on-failure -E '(testscr|testkdb)_.*'
	find "$(T)" | sort
	rm -rf "$(T)"
endif

override_dh_auto_install:
	dh_auto_install
	find $(CURDIR)/debian/tmp \( -name '*.map' -o -name '*.md5' \) -delete

override_dh_install:
	dh_install --list-missing

override_dh_compress:
	dh_compress -X.lua -Xexamples

override_dh_strip:
	dh_strip --dbg-package=elektra-dbg

override_dh_makeshlibs:
	dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/elektra4 -Xlibelektragetenv.so

override_dh_shlibdeps:
	# to find libelektragetenv.so
	dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/

override_dh_gencontrol:
	dh_gencontrol -- -Velektra:allPlugins='$(PKGS_ALL_PLUGINS)'