rules 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #!/usr/bin/make -f
  2. # Sample debian/rules that uses debhelper.
  3. # GNU copyright 1997 to 1999 by Joey Hess.
  4. # Uncomment this to turn on verbose mode.
  5. #export DH_VERBOSE=1
  6. # This is the debhelper compatibility version to use.
  7. export DH_COMPAT=4
  8. # These are used for cross-compiling and for saving the configure script
  9. # from having to guess our platform (since we know it already)
  10. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  11. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  12. ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  13. CFLAGS += -g
  14. endif
  15. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  16. INSTALL_PROGRAM += -s
  17. endif
  18. config.status: configure
  19. dh_testdir
  20. # Add here commands to configure the package.
  21. ./configure --host=$(DEB_HOST_GNU_TYPE) \
  22. --build=$(DEB_BUILD_GNU_TYPE) \
  23. --prefix=/usr \
  24. --mandir=\$${prefix}/share/man \
  25. --infodir=\$${prefix}/share/info
  26. build: build-stamp
  27. build-stamp: config.status
  28. dh_testdir
  29. # Add here commands to compile the package.
  30. $(MAKE)
  31. #/usr/bin/docbook-to-man debian/tcpreplay.sgml > tcpreplay.1
  32. touch build-stamp
  33. clean:
  34. dh_testdir
  35. dh_testroot
  36. rm -f build-stamp
  37. # Add here commands to clean up after the build process.
  38. -$(MAKE) distclean
  39. -test -r /usr/share/misc/config.sub && \
  40. cp -f /usr/share/misc/config.sub config.sub
  41. -test -r /usr/share/misc/config.guess && \
  42. cp -f /usr/share/misc/config.guess config.guess
  43. dh_clean
  44. install: build
  45. dh_testdir
  46. dh_testroot
  47. dh_clean -k
  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_installdebconf
  59. dh_installdocs
  60. # dh_installexamples
  61. # dh_installmenu
  62. # dh_installlogrotate
  63. # dh_installemacsen
  64. # dh_installpam
  65. # dh_installmime
  66. # dh_installinit
  67. dh_installcron
  68. dh_installman
  69. # dh_installinfo
  70. # dh_undocumented
  71. dh_installchangelogs docs/CHANGELOG
  72. dh_link
  73. dh_strip
  74. dh_compress
  75. dh_fixperms
  76. # dh_makeshlibs
  77. dh_installdeb
  78. # dh_perl
  79. dh_shlibdeps
  80. dh_gencontrol
  81. dh_md5sums
  82. dh_builddeb
  83. binary: binary-indep binary-arch
  84. .PHONY: build clean binary-indep binary-arch binary install