/tags/debian_5-0-1_0-potato-4/debian/rules

# · Makefile · 128 lines · 92 code · 16 blank · 20 comment · 1 complexity · 2b64a38bc60a714538f3f0f74a641c54 MD5 · raw file

  1. #!/usr/bin/make -f
  2. # -*- Makefile -*-
  3. # Made with the aid of dh_make, by Craig Small
  4. # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
  5. # This version is for a hypothetical package that builds an
  6. # architecture-dependant package, as well as an architecture-independant
  7. # package.
  8. # Modified by Rafael Laboissiere <rafael@icp.inpg.fr> on 1998/06/12
  9. # for the plplot package
  10. # Uncomment this to turn on verbose mode.
  11. #export DH_VERBOSE=1
  12. debbase := $(shell pwd)/debian
  13. debtmp := $(debbase)/tmp
  14. debusr := $(debtmp)/usr
  15. deblib := $(debusr)/lib
  16. debdoc := $(debusr)/share/doc
  17. cfflags := --with-double --disable-linuxvga --without-rpath
  18. build: build-stamp
  19. build-stamp:
  20. dh_testdir
  21. ( cd cf ; \
  22. autoconf ; \
  23. mv configure .. )
  24. # Build first bare libraries (no Tcl/Tk)
  25. ./configure --prefix=/usr --disable-tcl --disable-tk \
  26. --disable-python $(cfflags)
  27. # This PLLIB_PATH setting is necessary to avoid the lintian error
  28. # ldconfig-symlink-referencing-wrong-file
  29. make PLLIB_PATH=
  30. mv tmp/lib*.{a,so}* tmp/plrender $(debbase)
  31. # Build the Tcl/Tk libraries
  32. ./configure --prefix=/usr --enable-tcl --enable-tk \
  33. --enable-python $(cfflags)
  34. make PLLIB_PATH=
  35. touch build-stamp
  36. clean:
  37. dh_testdir
  38. dh_testroot
  39. rm -f build-stamp
  40. -$(MAKE) clean
  41. rm -f configure confdefs.h config.log $(debbase)/lib* \
  42. $(debbase)/plrender
  43. dh_clean
  44. install: install-stamp
  45. install-stamp: build-stamp
  46. dh_testdir
  47. dh_testroot
  48. dh_clean -k
  49. (cd tmp; make PREFIX=$(debusr) install)
  50. # This hack ought to go away when it is fixed upstream
  51. chmod -x $(deblib)/plplot5.0.1/tcl/plcolor.tcl
  52. # Temporary hack
  53. rm -f $(debusr)/bin/plplot_linkage
  54. ( cd $(debdoc)/plplot ; \
  55. mv CHANGES changelog ; \
  56. rm -f Copyright COPYING.LIB mklinks README.local )
  57. dh_installmanpages --package=plplot
  58. dh_movefiles --package=python-plplot
  59. # Make x16.py non-executable. Temporary hack.
  60. chmod -x \
  61. $(debbase)/python-plplot/usr/share/doc/plplot/examples/python/x16.py
  62. touch install-stamp
  63. # Build architecture-independent files here.
  64. binary-indep: build install
  65. dh_testversion ge 2.0.86
  66. dh_testdir -i
  67. dh_testroot -i
  68. dh_installdocs -i
  69. dh_installchangelogs -i
  70. dh_movefiles -i
  71. dh_compress -i
  72. dh_fixperms -i
  73. dh_suidregister -i
  74. dh_installdeb -i
  75. dh_gencontrol -i
  76. dh_md5sums -i
  77. dh_builddeb -i
  78. binary-arch: build install
  79. dh_testversion ge 2.0.86
  80. dh_testdir -a
  81. dh_testroot -a
  82. dh_installdocs -a
  83. dh_installchangelogs -a
  84. dh_installdirs -a
  85. rm -f $(deblib)/libplcxxd.{so.5.*,so.5}
  86. mv $(debbase)/libplcxxd.{so.5.*,so.5} $(deblib)
  87. dh_movefiles -a
  88. # Why do not dh_movefiles remove empty dirs? Grumpf...
  89. ( cd $(debusr) ; \
  90. rm -rf include lib share/info share/man share/doc/plplot/examples )
  91. mv $(debbase)/libplplotd.{so.5.*,so.5} \
  92. $(debbase)/plplot-xwin/usr/lib
  93. mv $(debbase)/plrender $(debbase)/plplot-xwin/usr/bin
  94. cp $(debbase)/plrender.1 $(debbase)/plplot-xwin/usr/share/man/man1
  95. dh_strip -a
  96. dh_compress -a -Xexamples/
  97. dh_fixperms -a
  98. dh_suidregister -a
  99. dh_makeshlibs -a
  100. dh_installdeb -a
  101. dh_shlibdeps -a
  102. for i in xwin tcl ; do \
  103. dh_shlibdeps --package=plplot-$$i \
  104. -l$(debbase)/plplot-$$i/usr/lib ; \
  105. done
  106. dh_gencontrol -a
  107. dh_md5sums -a
  108. dh_builddeb -a
  109. source diff:
  110. @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
  111. binary: binary-indep binary-arch
  112. .PHONY: build clean binary-indep binary-arch binary