rules 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/make -f
  2. #Rodney Dawes Version simplifies things :)
  3. DH_CMAKE_BUILD_DIR=obj -${DEB_BUILD_GNU_TYPE}
  4. DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
  5. DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
  6. DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
  7. CMAKE_OPTS= -DCONTRIBUTORS=$(CURDIR)/doc/CONTRIBUTORS -DFORCE_VERSION=internal \
  8. -DWANT_QT5=1
  9. ifneq ($(DEB_HOST_ARCH_OS),linux)
  10. CMAKE_OPTS+= -DWANT_ALSA=0
  11. endif
  12. ifeq ($(DEB_HOST_ARCH),i386)
  13. export PATH := $(PATH):/usr/lib/wine
  14. WINE_PATH := /usr/lib/$(DEB_HOST_MULTIARCH)/wine
  15. CMAKE_OPTS+= -DWINE_CXX_FLAGS=-Wl,--enable-new-dtags,-rpath=$(WINE_PATH)
  16. else
  17. CMAKE_OPTS+= -DWANT_VST_NOWINE=1 \
  18. -DREMOTE_VST_PLUGIN_FILEPATH=../../i386-linux-gnu/lmms/RemoteVstPlugin
  19. endif
  20. # Define NDEBUG. This helps with reproducible builds.
  21. # Add -Wno-error=format-truncation because truncation is expected in snprintf.
  22. export CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS) -DNDEBUG
  23. export CXXFLAGS ?= $(shell dpkg-buildflags --get CXXFLAGS) -DNDEBUG \
  24. -Wno-error=format-truncation
  25. %:
  26. dh $@ --buildsystem cmake --parallel
  27. override_dh_auto_configure:
  28. dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) $(CMAKE_OPTS)