rules 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. touch build-stamp
  35. clean:
  36. dh_testdir
  37. dh_testroot
  38. rm -f build-stamp
  39. -$(MAKE) distclean
  40. dh_clean
  41. install: build
  42. dh_testdir
  43. dh_testroot
  44. dh_clean -k
  45. dh_installdirs
  46. $(MAKE) install DESTDIR=$(CURDIR)/debian/tor
  47. # Build architecture-independent files here.
  48. binary-indep: build install
  49. # We have nothing to do by default.
  50. # Build architecture-dependent files here.
  51. binary-arch: build install
  52. dh_testdir
  53. dh_testroot
  54. dh_installchangelogs ChangeLog
  55. dh_installdocs
  56. dh_installexamples
  57. # dh_install
  58. # dh_installdebconf
  59. dh_installlogrotate
  60. # dh_installemacsen
  61. # dh_installmime
  62. dh_installinit
  63. # dh_installcron
  64. dh_installman
  65. dh_link
  66. dh_strip
  67. dh_compress
  68. dh_fixperms
  69. dh_installdeb
  70. dh_shlibdeps
  71. dh_gencontrol
  72. dh_md5sums
  73. dh_builddeb
  74. binary: binary-indep binary-arch
  75. .PHONY: build clean binary-indep binary-arch binary install