rules 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. export DEB_BUILD_MAINT_OPTIONS=hardening=+all
  6. export TEST_VERBOSE=1
  7. ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
  8. DO_TEST = no
  9. endif
  10. DRAFTS=no
  11. # OBS build: add
  12. # Macros:
  13. # %_with_drafts 1
  14. # at the BOTTOM of the OBS prjconf
  15. OBS_BUILD_CFG=/.build/build.dist
  16. ifeq ("$(wildcard $(OBS_BUILD_CFG))","")
  17. BUILDCONFIG=$(shell ls -1 /usr/src/packages/SOURCES/_buildconfig* | head -n 1)
  18. endif
  19. ifneq ("$(wildcard $(OBS_BUILD_CFG))","")
  20. ifneq ("$(shell grep drafts $(OBS_BUILD_CFG))","")
  21. DRAFTS=yes
  22. endif
  23. endif
  24. # User build: DEB_BUILD_OPTIONS=drafts dpkg-buildpackage
  25. ifneq (,$(findstring drafts,$(DEB_BUILD_OPTIONS)))
  26. DRAFTS=yes
  27. endif
  28. # Workaround for automake < 1.14 bug
  29. $(shell dpkg --compare-versions `dpkg-query -W -f='$${Version}\n' automake` lt 1:1.14 && mkdir -p config)
  30. override_dh_clean:
  31. dh_clean
  32. find $(CURDIR) -type s -exec rm {} \;
  33. rm -f $(CURDIR)/doc/*.xml $(CURDIR)/doc/*.3 $(CURDIR)/doc/*.7
  34. rm -f config.log
  35. override_dh_auto_configure:
  36. dh_auto_configure -- --with-pgm --with-libsodium --enable-drafts=$(DRAFTS) --with-libgssapi_krb5=yes --with-norm=yes --with-nss=yes --with-tls=yes
  37. override_dh_auto_test:
  38. ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  39. ifneq ($(DO_TEST), no)
  40. dh_auto_test -- VERBOSE=1
  41. else
  42. -dh_auto_test -- VERBOSE=1
  43. endif
  44. endif
  45. override_dh_auto_install:
  46. dh_auto_install
  47. ifneq ("$(wildcard debian/zmq.hpp)","")
  48. cp $(CURDIR)/debian/zmq.hpp $(CURDIR)/debian/tmp/usr/include/
  49. endif
  50. override_dh_strip:
  51. dh_strip --dbg-package=libzmq5-dbg
  52. %:
  53. dh $@ --with=autoreconf --parallel
  54. .PHONY: override_dh_auto_configure override_dh_strip