Posted to tcl by colin at Sun Feb 17 23:15:40 GMT 2013view raw
- override_dh_auto_install:
- GZIP=-9 \
- $(MAKE) -C unix INSTALL_ROOT=$(DIR) \
- MAN_INSTALL_DIR=$(DIR)/usr/share/man \
- MANN_INSTALL_DIR=$(DIR)/usr/share/man/man3 \
- TCL_MODULE_PATH="/usr/lib/tcltk /usr/share/tcltk" \
- install
- # Fix up the modules
- sed -i -e's:variable paths {}:variable paths {/usr/share/tcltk/tcl$(v)/tcl8}:' \
- $(DIR)/usr/share/tcltk/tcl$(v)/tm.tcl
- install -d -m 755 $(DIR)/usr/share/tcltk/tcl$(v)/tcl8
- mv $(DIR)/usr/share/tcltk/tcl8/*/* $(DIR)/usr/share/tcltk/tcl$(v)/tcl8
- # Fix up the libraries
- cp unix/libtcl$(v).a $(DIR)/usr/lib
- #mv $(DIR)/usr/lib/libtcl$(v).so $(DIR)/usr/lib/libtcl$(v).so.0
- #ln -sf libtcl$(v).so.0 $(DIR)/usr/lib/libtcl$(v).so
- install -d -m 755 $(DIR)/usr/lib/tcl$(v)
- mv $(DIR)/usr/lib/*.sh $(DIR)/usr/lib/tcl$(v)
- sh debian/filterconfig $(DIR)/usr/lib/tcl$(v)/tclConfig.sh
- install -d -m 755 $(DIR)/usr/share/aclocal
- cp unix/tcl.m4 $(DIR)/usr/share/aclocal/tcl$(v).m4
- rm -f $(DIR)/usr/share/tcltk/tcl$(v)/ldAix
- # Fix up the include files
- install -d $(DIR)/usr/include/tcl$(v)/tcl-private/generic
- cp generic/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/generic
- install -d $(DIR)/usr/include/tcl$(v)/tcl-private/unix
- cp unix/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/unix
- install -d $(DIR)/usr/include/tcl$(v)/tcl-private/compat
- cp compat/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/compat
- install -d $(DIR)/usr/include/tcl$(v)/tcl-private/libtommath
- cp libtommath/*.h $(DIR)/usr/include/tcl$(v)/tcl-private/libtommath
- -rm $(DIR)/usr/include/tcl$(v)/tdbc*.h
- #
- # Fix up the manpages.
- cd $(DIR)/usr/share/man/man1 && \
- cat tclsh.1 | sed -e 's/(n)/(3tcl)/g' > tclsh$(v).1 && \
- rm tclsh.1
- cd $(DIR)/usr/share/man/man3 && \
- for f in *.[3n] ; do \
- f2=$$(echo $$f | sed -e 's/\.[3n]/.3tcl/') ; \
- if [ -L $$f ]; then \
- l=$$(readlink -n $$f | sed -e 's/\.[3n]/.3tcl/') ; \
- rm $$f ; \
- ln -sf $$l $$f2 ; \
- else \
- cat $$f | sed -e 's/^\.TH \([^ ]\+\|"[^"]\+"\) [3n]/.TH \1 3tcl/' \
- -e 's/\(Tk_[0-9A-Za-z]*\)(3)/\1(3tk)/g' \
- -e 's/\([A-Z][0-9A-Za-z_]*\)(3)/\1(3tcl)/g' \
- -e 's/send(n)/send(3tk)/g' \
- -e 's/text(n)/text(3tk)/g' \
- -e 's/tk(n)/tk(3tk)/g' \
- -e 's/winfo(n)/winfo(3tk)/g' \
- -e 's/(n)/(3tcl)/g' \
- -e "s/\\N'244'/\\[^o]/g" \
- >$$f2 ; \
- rm $$f ; \
- fi ; \
- done