rules 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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-arch build-indep
  21. build-arch: build-stamp
  22. build-indep: build-stamp
  23. build-stamp: configure
  24. dh_testdir
  25. $(MAKE)
  26. touch $@
  27. clean:
  28. dh_testdir
  29. dh_testroot
  30. rm -f build-stamp configure-stamp
  31. [ ! -f Makefile ] || $(MAKE) distclean
  32. dh_clean
  33. install: build
  34. dh_testdir
  35. dh_testroot
  36. dh_prep
  37. $(MAKE) GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \
  38. DESTDIR=$(CURDIR)/debian/tmp install
  39. dh_install --fail-missing
  40. binary-indep: install
  41. binary-arch: install
  42. dh_testdir
  43. dh_testroot
  44. dh_installchangelogs ChangeLog
  45. dh_installexamples mssh_clusters.conf
  46. dh_installdocs
  47. dh_installman
  48. dh_gconf
  49. dh_link
  50. dh_strip
  51. dh_compress
  52. dh_fixperms
  53. dh_installdeb
  54. dh_shlibdeps
  55. dh_gencontrol
  56. dh_md5sums
  57. dh_builddeb
  58. binary: binary-indep binary-arch
  59. .PHONY: build clean binary-indep binary-arch binary install