rules 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. install -m 755 contrib/torify $(CURDIR)/debian/tor/usr/bin
  52. install -m 644 contrib/torify.1 $(CURDIR)/debian/tor/usr/share/man/man1
  53. install -m 644 contrib/tor-tsocks.conf $(CURDIR)/debian/tor/etc/tor
  54. # Build architecture-independent files here.
  55. binary-indep: build install
  56. # We have nothing to do by default.
  57. # Build architecture-dependent files here.
  58. binary-arch: build install
  59. dh_testdir
  60. dh_testroot
  61. dh_installchangelogs ChangeLog
  62. dh_installdocs
  63. dh_installexamples
  64. # dh_install
  65. # dh_installdebconf
  66. dh_installlogrotate
  67. # dh_installemacsen
  68. # dh_installmime
  69. dh_installinit
  70. # dh_installcron
  71. dh_installman
  72. dh_link
  73. dh_strip
  74. dh_compress
  75. dh_fixperms
  76. dh_installdeb
  77. dh_shlibdeps
  78. dh_gencontrol
  79. dh_md5sums
  80. dh_builddeb
  81. binary: binary-indep binary-arch
  82. .PHONY: build clean binary-indep binary-arch binary install