rules 2.0 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. DEB_BUILD_MAINT_OPTIONS = hardening=+all
  12. DPKG_EXPORT_BUILDFLAGS = 1
  13. include /usr/share/dpkg/buildflags.mk
  14. CFLAGS += -g -Wall
  15. configure-stamp:
  16. dh_testdir
  17. dh_autoreconf
  18. # Add here commands to configure the package.
  19. CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
  20. --build=$(DEB_BUILD_GNU_TYPE) \
  21. --prefix=/usr \
  22. --enable-debug \
  23. --enable-dynamic-link \
  24. --mandir=\$${prefix}/share/man \
  25. --infodir=\$${prefix}/share/info
  26. touch configure-stamp
  27. build: build-arch build-indep
  28. build-arch: build-stamp
  29. build-indep: build-stamp
  30. build-stamp: configure-stamp
  31. dh_testdir
  32. # Add here commands to compile the package.
  33. $(MAKE)
  34. #/usr/bin/docbook-to-man debian/tcpreplay.sgml > tcpreplay.1
  35. touch build-stamp
  36. clean:
  37. dh_testdir
  38. dh_testroot
  39. rm -f build-stamp configure-stamp
  40. # Add here commands to clean up after the build process.
  41. [ ! -f Makefile ] || $(MAKE) distclean
  42. dh_autoreconf_clean
  43. dh_clean
  44. install: build
  45. dh_testdir
  46. dh_testroot
  47. dh_prep
  48. dh_installdirs
  49. # Add here commands to install the package into debian/tcpreplay.
  50. $(MAKE) install prefix=$(CURDIR)/debian/tcpreplay/usr
  51. # Build architecture-independent files here.
  52. binary-indep: build install
  53. # We have nothing to do by default.
  54. # Build architecture-dependent files here.
  55. binary-arch: build install
  56. dh_testdir
  57. dh_testroot
  58. dh_installdocs
  59. dh_installcron
  60. dh_installman
  61. dh_installchangelogs docs/CHANGELOG
  62. dh_link
  63. dh_strip
  64. dh_compress
  65. dh_fixperms
  66. dh_installdeb
  67. dh_shlibdeps
  68. dh_gencontrol
  69. dh_md5sums
  70. dh_builddeb
  71. binary: binary-indep binary-arch
  72. .PHONY: build clean binary-indep binary-arch binary install configure