/contrib/dialog/package/debian/rules

https://bitbucket.org/freebsd/freebsd-head/ · Makefile · 95 lines · 63 code · 21 blank · 11 comment · 1 complexity · e18e0d319d3bc913c5c80a58babf4018 MD5 · raw file

  1. #!/usr/bin/make -f
  2. # MAde with the aid of dh_make, by Craig Small
  3. # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
  4. # Some lines taken from debmake, by Cristoph Lameter.
  5. # Uncomment this to turn on verbose mode.
  6. #export DH_VERBOSE=1
  7. # These are used for cross-compiling and for saving the configure script
  8. # from having to guess our platform (since we know it already)
  9. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  10. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  11. CFLAGS =
  12. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  13. CFLAGS += -O0
  14. else
  15. CFLAGS += -O2
  16. endif
  17. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  18. INSTALL_PROGRAM += -s
  19. endif
  20. configure: configure-stamp
  21. configure-stamp:
  22. dh_testdir
  23. CFLAGS="$(CFLAGS)" ./configure \
  24. --host=$(DEB_HOST_GNU_TYPE) \
  25. --build=$(DEB_BUILD_GNU_TYPE) \
  26. --prefix=/usr \
  27. --mandir=\$${prefix}/share/man \
  28. --enable-nls \
  29. --enable-header-subdir \
  30. --enable-widec \
  31. --with-libtool \
  32. --with-ncursesw \
  33. --with-package=cdialog \
  34. --disable-rpath-hack
  35. touch configure-stamp
  36. build: build-stamp
  37. build-stamp: configure-stamp
  38. dh_testdir
  39. $(MAKE)
  40. touch build-stamp
  41. clean:
  42. dh_testdir
  43. dh_testroot
  44. [ ! -f makefile ] || $(MAKE) distclean
  45. rm -f configure-stamp build-stamp install-stamp
  46. dh_clean
  47. install: install-stamp
  48. install-stamp: build-stamp
  49. dh_testdir
  50. dh_testroot
  51. dh_clean -k
  52. dh_installdirs
  53. $(MAKE) install DESTDIR=$(CURDIR)/debian/cdialog
  54. touch install-stamp
  55. # Build architecture-independent files here.
  56. binary-indep: build install
  57. # No binary-indep target.
  58. # Build architecture-dependent files here.
  59. binary-arch: build install
  60. dh_testdir
  61. dh_testroot
  62. dh_installdocs
  63. dh_installexamples
  64. dh_installchangelogs CHANGES
  65. dh_strip
  66. dh_compress
  67. dh_fixperms
  68. dh_installdeb
  69. dh_shlibdeps
  70. dh_gencontrol
  71. dh_md5sums
  72. dh_builddeb
  73. binary: binary-indep binary-arch
  74. .PHONY: build clean binary-indep binary-arch binary install install-stamp