rules 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/make -f
  2. CFLAGS = -Wall -g
  3. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  4. CFLAGS += -O0
  5. else
  6. CFLAGS += -O2
  7. endif
  8. DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  9. DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  10. build: build-stamp
  11. build-stamp:
  12. dh_testdir
  13. ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --mandir=/usr/share/man
  14. $(MAKE) CFLAGS="$(CFLAGS)"
  15. touch build-stamp
  16. clean:
  17. dh_testdir
  18. dh_testroot
  19. rm -f build-stamp
  20. [ ! -f Makefile ] || $(MAKE) distclean
  21. dh_clean Makefile config.log config.status
  22. install: build
  23. dh_testdir
  24. dh_testroot
  25. dh_clean -k
  26. dh_installdirs usr/bin usr/share/man/man1
  27. $(MAKE) DESTDIR=$(CURDIR)/debian/isync install
  28. rm -r $(CURDIR)/debian/isync/usr/share/doc
  29. mv $(CURDIR)/debian/isync/usr/bin/get-cert $(CURDIR)/debian/isync/usr/bin/mbsync-get-cert
  30. binary-indep: build install
  31. binary-arch: build install
  32. dh_testdir
  33. dh_testroot
  34. dh_installchangelogs ChangeLog
  35. dh_installdocs AUTHORS NEWS README TODO
  36. dh_installexamples src/mbsyncrc.sample src/compat/isyncrc.sample
  37. dh_installman
  38. dh_strip
  39. dh_compress
  40. dh_fixperms
  41. dh_installdeb
  42. dh_shlibdeps
  43. dh_gencontrol
  44. dh_md5sums
  45. dh_builddeb
  46. binary: binary-indep binary-arch
  47. .PHONY: build clean binary-indep binary-arch binary install