rules 2.2 KB

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