2016-07-30 16:05:25 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2019-04-05 21:34:01 +02:00
|
|
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
|
|
|
|
2016-07-30 16:05:25 +02:00
|
|
|
export TEST_VERBOSE=1
|
|
|
|
|
|
|
|
ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
|
|
|
|
DO_TEST = no
|
|
|
|
endif
|
|
|
|
|
2016-08-28 16:44:28 +02:00
|
|
|
DRAFTS=no
|
|
|
|
|
|
|
|
# OBS build: add
|
|
|
|
# Macros:
|
|
|
|
# %_with_drafts 1
|
|
|
|
# at the BOTTOM of the OBS prjconf
|
|
|
|
OBS_BUILD_CFG=/.build/build.dist
|
|
|
|
ifeq ("$(wildcard $(OBS_BUILD_CFG))","")
|
|
|
|
BUILDCONFIG=$(shell ls -1 /usr/src/packages/SOURCES/_buildconfig* | head -n 1)
|
|
|
|
endif
|
|
|
|
ifneq ("$(wildcard $(OBS_BUILD_CFG))","")
|
|
|
|
ifneq ("$(shell grep drafts $(OBS_BUILD_CFG))","")
|
|
|
|
DRAFTS=yes
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# User build: DEB_BUILD_OPTIONS=drafts dpkg-buildpackage
|
|
|
|
ifneq (,$(findstring drafts,$(DEB_BUILD_OPTIONS)))
|
|
|
|
DRAFTS=yes
|
|
|
|
endif
|
|
|
|
|
2016-12-28 00:55:17 +01:00
|
|
|
# Workaround for automake < 1.14 bug
|
|
|
|
$(shell dpkg --compare-versions `dpkg-query -W -f='$${Version}\n' automake` lt 1:1.14 && mkdir -p config)
|
|
|
|
|
2016-07-30 16:05:25 +02:00
|
|
|
override_dh_clean:
|
|
|
|
dh_clean
|
|
|
|
find $(CURDIR) -type s -exec rm {} \;
|
|
|
|
rm -f $(CURDIR)/doc/*.xml $(CURDIR)/doc/*.3 $(CURDIR)/doc/*.7
|
|
|
|
rm -f config.log
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
2019-10-04 16:19:16 +02:00
|
|
|
dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes --with-nss=yes --with-tls=yes
|
2016-07-30 16:05:25 +02:00
|
|
|
|
|
|
|
override_dh_auto_test:
|
|
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
|
|
ifneq ($(DO_TEST), no)
|
2017-11-16 01:47:24 +01:00
|
|
|
dh_auto_test -- VERBOSE=1
|
2016-07-30 16:05:25 +02:00
|
|
|
else
|
|
|
|
-dh_auto_test -- VERBOSE=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-12-01 00:52:42 +01:00
|
|
|
override_dh_auto_install:
|
|
|
|
dh_auto_install
|
|
|
|
ifneq ("$(wildcard debian/zmq.hpp)","")
|
|
|
|
cp $(CURDIR)/debian/zmq.hpp $(CURDIR)/debian/tmp/usr/include/
|
|
|
|
endif
|
|
|
|
|
2016-07-30 16:05:25 +02:00
|
|
|
override_dh_strip:
|
|
|
|
dh_strip --dbg-package=libzmq5-dbg
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@ --with=autoreconf --parallel
|
|
|
|
|
|
|
|
.PHONY: override_dh_auto_configure override_dh_strip
|