home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / ap / texinfo / slackbui < prev    next >
Text File  |  1995-10-10  |  2KB  |  70 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-texinfo
  8. SRC=/devel/manpagesrc
  9. INFO=/devel/info-pages/usr/info
  10. TEX=/devel/texinfo-docs
  11.  
  12. if [ ! -d $TMP ]; then
  13.   mkdir -p $TMP # location to build the source
  14. fi
  15. if [ ! -d $PKG ]; then
  16.   mkdir -p $PKG # place for the package to be built
  17. fi
  18.  
  19. # Explode the package framework:
  20. cd $PKG
  21. explodepkg $CWD/_texinfo.tar.gz
  22.  
  23. # Function to handle manpage source:
  24. man2gz () { # $1 is source page name, $2 is target name for preformatted
  25.             # output (full path && name) and $3 is the same, but for the
  26.             # source.
  27.   mkdir -p `dirname $2`
  28.   groff -s -p -t -e -Tascii -mandoc $1 | gzip -9c > $2
  29.   if [ ! "$3" = "" ]; then
  30.     mkdir -p `dirname $3`
  31.     cat $1 > $3 
  32.   fi 
  33. }
  34.  
  35. echo "+=============+"
  36. echo "| texinfo-3.6 |"
  37. echo "+=============+"
  38. cd $TMP
  39. tar xzvf $CWD/texinfo-3.6.tar.gz
  40. cd texinfo-3.6
  41. ./configure --prefix=/usr
  42. make CFLAGS=-O2 LDFLAGS=-s
  43. cat makeinfo/makeinfo > $PKG/usr/bin/makeinfo
  44. gzip -9c makeinfo/makeinfo.info > $PKG/usr/info/makeinfo.info.gz
  45. cat info/info > $PKG/usr/bin/info
  46. gzip -9c info/info.info > $PKG/usr/info/info.info.gz
  47. gzip -9c info/info-stnd.info > $PKG/usr/info/info-stnd.info.gz
  48. gzip -9c info/info.1 > $PKG/usr/man/man1/info.1.gz
  49. cat util/texindex > $PKG/usr/bin/texindex
  50. cat util/texi2dvi > $PKG/usr/bin/texi2dvi
  51. for file in emacs/info.elc emacs/makeinfo.elc emacs/texinfo.elc \
  52. emacs/texnfo-upd.elc emacs/texnfo-tex.elc emacs/texinfmt.elc \
  53. emacs/informat.elc emacs/detexinfo.elc; do 
  54.   cp $file $PKG/usr/share/emacs/site-lisp
  55. done
  56. for file in texinfo texinfo-* ; do
  57.   gzip -9c $file > $PKG/usr/info/$file.gz
  58. done
  59. cp texinfo.tex $PKG/usr/lib/texinfo
  60.  
  61. # Build the package:
  62. cd $PKG
  63. tar czvf $TMP/texinfo.tgz .
  64.  
  65. # Clean up the extra stuff:
  66. if [ "$1" = "--cleanup" ]; then
  67.   rm -rf $TMP/texinfo-3.6
  68.   rm -rf $PKG
  69. fi
  70.