1
0

rules 1.2 KB

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