| 1 |
#!/usr/bin/make -f |
| 2 |
#export DH_VERBOSE = 1 |
| 3 |
|
| 4 |
# see FEATURE AREAS in dpkg-buildflags(1) |
| 5 |
include /usr/share/dpkg/architecture.mk |
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
export DEB_VERSION_UPSTREAM |
| 8 |
|
| 9 |
DEB_REQUESTED_PACKAGES := $(shell dh_listpackages) |
| 10 |
when-in-build-profile = $(patsubst 0,$(3),$(patsubst 1,$(2),$(patsubst 01,1,0$(patsubst $(1),1,$(filter $(1),$(DEB_BUILD_PROFILES)))))) |
| 11 |
when-not-in-build-profile = $(patsubst 0,$(3),$(patsubst 1,$(2),$(patsubst 11,0,1$(patsubst $(1),1,$(filter $(1),$(DEB_BUILD_PROFILES)))))) |
| 12 |
when-building-package = $(patsubst 0,$(3),$(patsubst 1,$(2),$(patsubst 01,1,0$(patsubst $(1),1,$(filter $(1),$(DEB_REQUESTED_PACKAGES)))))) |
| 13 |
when-not-building-package = $(patsubst 0,$(3),$(patsubst 1,$(2),$(patsubst 11,0,1$(patsubst $(1),1,$(filter $(1),$(DEB_REQUESTED_PACKAGES)))))) |
| 14 |
|
| 15 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 16 |
|
| 17 |
%: |
| 18 |
dh $@ |
| 19 |
|
| 20 |
# I suspect this might be necessary to minimize the ABI difference |
| 21 |
# when disabling JNI (otherwise C++11 is used which should generate |
| 22 |
# different symbols thus throwing off dh_gensymbols) |
| 23 |
options += -DCMAKE_CXX_STANDARD=14 |
| 24 |
options += -DDEB_VERSION_UPSTREAM=$${DEB_VERSION_UPSTREAM%+dfsg*} |
| 25 |
options += -DCMAKE_SKIP_RPATH=ON # with debhelper 14 this will be the default |
| 26 |
options += -DENABLE_UNIT_TESTS=NO # would need: libbellesip-dev |
| 27 |
|
| 28 |
features += -DBUILD_SHARED_LIBS=YES |
| 29 |
features += -DENABLE_DOC=$(call when-building-package,liblime-doc,YES,NO) # doxygen |
| 30 |
features += -DENABLE_CURVE448=YES # libdecaf-dev |
| 31 |
features += -DENABLE_CURVE25519=YES # libbctoolbox-dev |
| 32 |
features += -DENABLE_JNI=NO |
| 33 |
features += -DENABLE_C_INTERFACE=YES |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
if ! [ -f debian/liblime1.shlibs ]; then \ |
| 37 |
echo "HINT: You must update d/rules to have the new soname!" | grep --color '^.*$$' >&2 ; \ |
| 38 |
false ; \ |
| 39 |
fi |
| 40 |
dh_auto_configure -- \ |
| 41 |
${options} \ |
| 42 |
${features} |
| 43 |
|
| 44 |
override_dh_auto_build-indep: |
| 45 |
dh_auto_build -- lime-doc |
| 46 |
|
| 47 |
override_dh_auto_install-indep: |