rules 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/usr/bin/make -f
  2. # Uncomment this to turn on verbose mode.
  3. #export DH_VERBOSE=1
  4. DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  5. DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  6. ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  7. confflags= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
  8. else
  9. confflags= --build $(DEB_BUILD_GNU_TYPE)
  10. endif
  11. CFLAGS = `dpkg-buildflags --get CFLAGS`
  12. CFLAGS += -g -Wall
  13. CXXFLAGS = `dpkg-buildflags --get CXXFLAGS` -g -Wall
  14. LDFLAGS = `dpkg-buildflags --get LDFLAGS`
  15. CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
  16. configure-stamp:
  17. dh_testdir
  18. dh_autoreconf
  19. # Add here commands to configure the package.
  20. CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
  21. --build=$(DEB_BUILD_GNU_TYPE) \
  22. --prefix=/usr \
  23. --enable-debug \
  24. --enable-dynamic-link \
  25. --mandir=\$${prefix}/share/man \
  26. --infodir=\$${prefix}/share/info
  27. touch configure-stamp
  28. build: build-arch build-indep
  29. build-arch: build-stamp
  30. build-indep: build-stamp
  31. build-stamp: configure-stamp
  32. dh_testdir
  33. # Add here commands to compile the package.
  34. $(MAKE)
  35. #/usr/bin/docbook-to-man debian/tcpreplay.sgml > tcpreplay.1
  36. touch build-stamp
  37. clean:
  38. dh_testdir
  39. dh_testroot
  40. rm -f build-stamp configure-stamp
  41. # Add here commands to clean up after the build process.
  42. [ ! -f Makefile ] || $(MAKE) distclean
  43. dh_autoreconf_clean
  44. dh_clean
  45. install: build
  46. dh_testdir
  47. dh_testroot
  48. dh_clean -k
  49. dh_installdirs
  50. # Add here commands to install the package into debian/tcpreplay.
  51. $(MAKE) install prefix=$(CURDIR)/debian/tcpreplay/usr
  52. # Build architecture-independent files here.
  53. binary-indep: build install
  54. # We have nothing to do by default.
  55. # Build architecture-dependent files here.
  56. binary-arch: build install
  57. dh_testdir
  58. dh_testroot
  59. dh_installdocs
  60. dh_installcron
  61. dh_installman
  62. dh_installchangelogs docs/CHANGELOG
  63. dh_link
  64. dh_strip
  65. dh_compress
  66. dh_fixperms
  67. dh_installdeb
  68. dh_shlibdeps
  69. dh_gencontrol
  70. dh_md5sums
  71. dh_builddeb
  72. binary: binary-indep binary-arch
  73. .PHONY: build clean binary-indep binary-arch binary install configure