File: rules

package info (click to toggle)
libkolab 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,540 kB
  • ctags: 1,308
  • sloc: cpp: 11,600; php: 273; sh: 78; makefile: 35; xml: 20; ansic: 15
file content (50 lines) | stat: -rwxr-xr-x 1,450 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk

PYTHON2_SITEARCH := $(shell python2 -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
PYTHON3_SITEARCH := $(shell python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib(1))')
export BUILD_PY3 := build-py3

# export DH_VERBOSE=1

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

%:
	dh $@ --parallel --with python2,python3,pkgkde-symbolshelper

override_dh_auto_configure:
	dh_auto_configure -- \
		-DPYTHON_BINDINGS=ON \
		-DPYTHON_INSTALL_DIR=$(PYTHON2_SITEARCH) \
		-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
		-DPYTHON_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpython2.7.so
	dh_auto_configure --builddirectory=$(BUILD_PY3) -- \
		-DPHP_BINDINGS=OFF \
		-DPYTHON_BINDINGS=ON \
		-DPYTHON_INSTALL_DIR=$(PYTHON3_SITEARCH) \
		-DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \
		-DPYTHON_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpython3.5m.so

override_dh_auto_build:
	dh_auto_build --parallel --builddirectory=$(BUILD_PY3)
	dh_auto_build --parallel

override_dh_auto_install:
	# Install the packages
	dh_auto_install --builddirectory=$(BUILD_PY3)
	dh_auto_install

override_dh_install:
	dh_install --fail-missing -Xdummy.php

override_dh_auto_test:

override_dh_shlibdeps:
	dh_shlibdeps -- -xkdepim-runtime

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILD_PY3)