rules 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/usr/bin/make -f
  2. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  3. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  4. CFLAGS = -O2 -Wall
  5. LDFLAGS = -Wl,--as-needed
  6. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  7. CFLAGS += -O0
  8. else
  9. CFLAGS += -O2
  10. endif
  11. configure: configure-stamp
  12. configure-stamp:
  13. dh_testdir
  14. LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" ./configure \
  15. --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
  16. --prefix=/usr --mandir=\$${prefix}/share/man \
  17. --infodir=\$${prefix}/share/info \
  18. --with-gconf-schema-file-dir=/usr/share/gconf/schemas
  19. touch $@
  20. build: build-stamp
  21. build-stamp: configure
  22. dh_testdir
  23. $(MAKE)
  24. touch $@
  25. clean:
  26. dh_testdir
  27. dh_testroot
  28. rm -f build-stamp configure-stamp
  29. [ ! -f Makefile ] || $(MAKE) distclean
  30. dh_clean
  31. install: build
  32. dh_testdir
  33. dh_testroot
  34. dh_prep
  35. $(MAKE) GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \
  36. DESTDIR=$(CURDIR)/debian/tmp install
  37. dh_install --fail-missing
  38. binary-indep: install
  39. binary-arch: install
  40. dh_testdir
  41. dh_testroot
  42. dh_installchangelogs ChangeLog
  43. dh_installexamples mssh_clusters.conf
  44. dh_installdocs
  45. dh_installman
  46. dh_bash-completion
  47. dh_gconf
  48. dh_link
  49. dh_strip
  50. dh_compress
  51. dh_fixperms
  52. dh_installdeb
  53. dh_shlibdeps
  54. dh_gencontrol
  55. dh_md5sums
  56. dh_builddeb
  57. binary: binary-indep binary-arch
  58. .PHONY: build clean binary-indep binary-arch binary install