Posted to tcl by colin at Sun Feb 17 23:15:40 GMT 2013view raw

  1. override_dh_auto_install:
  2. GZIP=-9 \
  3. $(MAKE) -C unix INSTALL_ROOT=$(DIR) \
  4. MAN_INSTALL_DIR=$(DIR)/usr/share/man \
  5. MANN_INSTALL_DIR=$(DIR)/usr/share/man/man3 \
  6. TCL_MODULE_PATH="/usr/lib/tcltk /usr/share/tcltk" \
  7. install
  8. # Fix up the modules
  9. sed -i -e's:variable paths {}:variable paths {/usr/share/tcltk/tcl$(v)/tcl8}:' \
  10. $(DIR)/usr/share/tcltk/tcl$(v)/tm.tcl
  11. install -d -m 755 $(DIR)/usr/share/tcltk/tcl$(v)/tcl8
  12. mv $(DIR)/usr/share/tcltk/tcl8/*/* $(DIR)/usr/share/tcltk/tcl$(v)/tcl8
  13. # Fix up the libraries
  14. cp unix/libtcl$(v).a $(DIR)/usr/lib
  15. #mv $(DIR)/usr/lib/libtcl$(v).so $(DIR)/usr/lib/libtcl$(v).so.0
  16. #ln -sf libtcl$(v).so.0 $(DIR)/usr/lib/libtcl$(v).so
  17. install -d -m 755 $(DIR)/usr/lib/tcl$(v)
  18. mv $(DIR)/usr/lib/*.sh $(DIR)/usr/lib/tcl$(v)
  19. sh debian/filterconfig $(DIR)/usr/lib/tcl$(v)/tclConfig.sh
  20. install -d -m 755 $(DIR)/usr/share/aclocal
  21. cp unix/tcl.m4 $(DIR)/usr/share/aclocal/tcl$(v).m4
  22. rm -f $(DIR)/usr/share/tcltk/tcl$(v)/ldAix
  23. # Fix up the include files
  24. install -d $(DIR)/usr/include/tcl$(v)/tcl-private/generic
  25. cp generic/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/generic
  26. install -d $(DIR)/usr/include/tcl$(v)/tcl-private/unix
  27. cp unix/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/unix
  28. install -d $(DIR)/usr/include/tcl$(v)/tcl-private/compat
  29. cp compat/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/compat
  30. install -d $(DIR)/usr/include/tcl$(v)/tcl-private/libtommath
  31. cp libtommath/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/libtommath
  32. -rm $(DIR)/usr/include/tcl$(v)/tdbc*.h
  33. #
  34. # Fix up the manpages.
  35. cd $(DIR)/usr/share/man/man1 && \
  36. cat tclsh.1 | sed -e 's/(n)/(3tcl)/g' > tclsh$(v).1 && \
  37. rm tclsh.1
  38. cd $(DIR)/usr/share/man/man3 && \
  39. for f in *.[3n] ; do \
  40. f2=$$(echo $$f | sed -e 's/\.[3n]/.3tcl/') ; \
  41. if [ -L $$f ]; then \
  42. l=$$(readlink -n $$f | sed -e 's/\.[3n]/.3tcl/') ; \
  43. rm $$f ; \
  44. ln -sf $$l $$f2 ; \
  45. else \
  46. cat $$f | sed -e 's/^\.TH \([^ ]\+\|"[^"]\+"\) [3n]/.TH \1 3tcl/' \
  47. -e 's/\(Tk_[0-9A-Za-z]*\)(3)/\1(3tk)/g' \
  48. -e 's/\([A-Z][0-9A-Za-z_]*\)(3)/\1(3tcl)/g' \
  49. -e 's/send(n)/send(3tk)/g' \
  50. -e 's/text(n)/text(3tk)/g' \
  51. -e 's/tk(n)/tk(3tk)/g' \
  52. -e 's/winfo(n)/winfo(3tk)/g' \
  53. -e 's/(n)/(3tcl)/g' \
  54. -e "s/\\N'244'/\\[^o]/g" \
  55. >$$f2 ; \
  56. rm $$f ; \
  57. fi ; \
  58. done