home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / NCURSES / SLACKBUI < prev   
Encoding:
Text File  |  1995-04-20  |  1.9 KB  |  69 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-ncurses
  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. tar xzvf $CWD/_ncurses.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 -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 "| ncurses-1.8.6 |"
  37. echo "+===============+"
  38. cd $TMP
  39. tar xzvf $CWD/ncurses-1.8.6.tar.gz
  40. cd ncurses-1.8.6
  41. zcat $CWD/ncurses-1.8.6.diff.gz | patch -p1
  42. zcat $CWD/ncurses-1.8.5-patch.gz | patch -p1
  43. cd src
  44. make
  45. cat libdcurses.a > $PKG/usr/lib/libdcurses.a
  46. cat libncurses.a > $PKG/usr/lib/libncurses.a
  47. strip tic
  48. cat tic > $PKG/usr/bin/tic
  49. cd ../man
  50. man2gz captoinfo.1m $PKG/usr/man/preformat/cat1/captoinfo.1m.gz $SRC/usr/man/man1/captoinfo.1m
  51. man2gz infocmp.1m $PKG/usr/man/preformat/cat1/infocmp.1m.gz $SRC/usr/man/man1/infocmp.1m
  52. man2gz tic.1m $PKG/usr/man/preformat/cat1/tic.1m.gz $SRC/usr/man/man1/tic.1m
  53. man2gz tput.1 $PKG/usr/man/preformat/cat1/tput.1.gz $SRC/usr/man/man1/tput.1
  54. man2gz term.5 $PKG/usr/man/preformat/cat5/term.5.gz $SRC/usr/man/man5/term.5
  55. man2gz terminfo.5 $PKG/usr/man/preformat/cat5/terminfo.5.gz $SRC/usr/man/man5/terminfo.5
  56. for file in *.3x ; do
  57.   man2gz $file $PKG/usr/man/preformat/cat3/$file.gz $SRC/usr/man/man3/$file
  58. done
  59.  
  60. # Build the package:
  61. cd $PKG
  62. tar czvf $TMP/ncurses.tgz .
  63.  
  64. # Clean up the extra stuff:
  65. if [ "$1" = "--cleanup" ]; then
  66.   rm -rf $TMP/ncurses-1.8.6
  67.   rm -rf $PKG
  68. fi
  69.