1
0

rules 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_gconf
  47. dh_link
  48. dh_strip
  49. dh_compress
  50. dh_fixperms
  51. dh_installdeb
  52. dh_shlibdeps
  53. dh_gencontrol
  54. dh_md5sums
  55. dh_builddeb
  56. binary: binary-indep binary-arch
  57. .PHONY: build clean binary-indep binary-arch binary install