rules 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/usr/bin/make -f
  2. # Sample debian/rules that uses debhelper.
  3. # GNU copyright 1997 to 1999 by Joey Hess.
  4. # Uncomment this to turn on verbose mode.
  5. #export DH_VERBOSE=1
  6. # This is the debhelper compatability version to use.
  7. export DH_COMPAT=1
  8. build: build-stamp
  9. build-stamp:
  10. dh_testdir
  11. # # If the Makefile.in.in file in po/ already contains DESTDIR support, skip the patching.
  12. cd `pwd`/po ; ( \
  13. if ! grep DESTDIR Makefile.in.in > /dev/null ; then \
  14. patch -Ns -p0 < `pwd`/../debian/po-Makefile.in.in.diff || true ;\
  15. fi ;\
  16. )
  17. env CFLAGS='-O2 -Wall' ./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man \
  18. --infodir=\$${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
  19. $(MAKE)
  20. touch build-stamp
  21. clean:
  22. dh_testdir
  23. dh_testroot
  24. rm -f build-stamp
  25. -$(MAKE) cvs-clean
  26. dh_clean
  27. install: build
  28. dh_testdir
  29. dh_testroot
  30. dh_clean -k
  31. dh_installdirs
  32. $(MAKE) install DESTDIR=`pwd`/debian/tmp
  33. mkdir -p `pwd`/debian/tmp/etc/tinc
  34. cp -a doc/sample-config.tar.gz `pwd`/debian/tmp/etc/tinc/example
  35. cd `pwd`/debian/tmp/etc/tinc/example && tar xzf sample-config.tar.gz && rm sample-config.tar.gz
  36. ln -s /usr/share/doc/tinc/README.Debian `pwd`/debian/tmp/etc/tinc/example/README
  37. # Build architecture-independent files here.
  38. binary-indep: build install
  39. # We have nothing to do by default.
  40. # Build architecture-dependent files here.
  41. binary-arch: build install
  42. dh_testdir
  43. dh_testroot
  44. dh_installdocs
  45. dh_installexamples
  46. dh_installinit
  47. dh_installmanpages
  48. dh_installmodules
  49. dh_installinfo
  50. dh_installchangelogs ChangeLog
  51. dh_link
  52. dh_strip
  53. dh_compress
  54. dh_fixperms
  55. dh_installdeb
  56. dh_perl
  57. dh_shlibdeps
  58. dh_gencontrol
  59. dh_md5sums
  60. dh_builddeb
  61. binary: binary-indep binary-arch
  62. .PHONY: build clean binary-indep binary-arch binary install