rules 2.3 KB

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