rules 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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_installdocs
  44. dh_installman
  45. dh_gconf
  46. dh_link
  47. dh_strip
  48. dh_compress
  49. dh_fixperms
  50. dh_installdeb
  51. dh_shlibdeps
  52. dh_gencontrol
  53. dh_md5sums
  54. dh_builddeb
  55. binary: binary-indep binary-arch
  56. .PHONY: build clean binary-indep binary-arch binary install