rules 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. # GNU copyright 1997 to 1999 by Joey Hess.
  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 = -Wall -g
  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. config.status: configure
  21. dh_testdir
  22. CFLAGS="$(CFLAGS)" ./configure \
  23. --host=$(DEB_HOST_GNU_TYPE) \
  24. --build=$(DEB_BUILD_GNU_TYPE) \
  25. --prefix=/usr \
  26. --mandir=\$${prefix}/share/man \
  27. --infodir=\$${prefix}/share/info \
  28. --localstatedir=/var \
  29. --sysconfdir=/etc
  30. build: build-stamp
  31. build-stamp: config.status
  32. dh_testdir
  33. $(MAKE)
  34. @echo "Expect one assertion failure during test_buffers."
  35. # Right now test doesn't even fail when tests fail, so
  36. # no - needed.
  37. src/or/test
  38. touch build-stamp
  39. clean:
  40. dh_testdir
  41. dh_testroot
  42. rm -f build-stamp
  43. -$(MAKE) distclean
  44. dh_clean
  45. install: build
  46. dh_testdir
  47. dh_testroot
  48. dh_clean -k
  49. dh_installdirs
  50. $(MAKE) install DESTDIR=$(CURDIR)/debian/tor
  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_installchangelogs ChangeLog
  59. dh_installdocs
  60. dh_installexamples
  61. # dh_install
  62. # dh_installdebconf
  63. dh_installlogrotate
  64. # dh_installemacsen
  65. # dh_installmime
  66. dh_installinit
  67. # dh_installcron
  68. dh_installman
  69. dh_link
  70. dh_strip
  71. dh_compress
  72. dh_fixperms
  73. dh_installdeb
  74. dh_shlibdeps
  75. dh_gencontrol
  76. dh_md5sums
  77. dh_builddeb
  78. binary: binary-indep binary-arch
  79. .PHONY: build clean binary-indep binary-arch binary install