rules 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. export PACKAGE=tor
  13. include /usr/share/dpatch/dpatch.make
  14. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  15. CFLAGS += -O0
  16. else
  17. CFLAGS += -O2
  18. endif
  19. #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  20. # INSTALL_PROGRAM += -s
  21. #endif
  22. configure: patch-stamp
  23. config.status: configure
  24. dh_testdir
  25. CFLAGS="$(CFLAGS)" ./configure \
  26. --host=$(DEB_HOST_GNU_TYPE) \
  27. --build=$(DEB_BUILD_GNU_TYPE) \
  28. --prefix=/usr \
  29. --mandir=\$${prefix}/share/man \
  30. --infodir=\$${prefix}/share/info \
  31. --localstatedir=/var \
  32. --sysconfdir=/etc
  33. build: build-stamp
  34. build-stamp: config.status
  35. dh_testdir
  36. $(MAKE)
  37. @echo
  38. @echo
  39. src/or/test
  40. @echo
  41. touch build-stamp
  42. clean: unpatch
  43. dh_testdir
  44. dh_testroot
  45. rm -f build-stamp
  46. -$(MAKE) distclean
  47. dh_clean
  48. install: build
  49. dh_testdir
  50. dh_testroot
  51. dh_clean -k
  52. dh_installdirs
  53. $(MAKE) install DESTDIR=$(CURDIR)/debian/tor
  54. # move tor to where it belongs
  55. mv $(CURDIR)/debian/tor/usr/bin/tor $(CURDIR)/debian/tor/usr/sbin/tor
  56. install -m 755 contrib/torify $(CURDIR)/debian/tor/usr/bin
  57. install -m 644 contrib/torify.1 $(CURDIR)/debian/tor/usr/share/man/man1
  58. install -m 644 contrib/tor-tsocks.conf $(CURDIR)/debian/tor/etc/tor
  59. install -m 644 debian/tor.lintian-override $(CURDIR)/debian/tor/usr/share/lintian/overrides/tor
  60. # Build architecture-independent files here.
  61. binary-indep: build install
  62. # We have nothing to do by default.
  63. # Build architecture-dependent files here.
  64. binary-arch: build install
  65. dh_testdir
  66. dh_testroot
  67. dh_installchangelogs ChangeLog
  68. dh_installdocs
  69. dh_installexamples
  70. # dh_install
  71. # dh_installdebconf
  72. dh_installlogrotate
  73. # dh_installemacsen
  74. # dh_installmime
  75. dh_installinit
  76. # dh_installcron
  77. dh_installman
  78. dh_link
  79. #dh_strip
  80. dh_compress
  81. dh_fixperms
  82. dh_installdeb
  83. dh_shlibdeps
  84. dh_gencontrol
  85. dh_md5sums
  86. dh_builddeb
  87. binary: binary-indep binary-arch
  88. .PHONY: build clean binary-indep binary-arch binary install