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

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-termsrc
  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. # Function to handle manpage source:
  20. man2gz () { # $1 is source page name, $2 is target name for preformatted
  21.             # output (full path && name) and $3 is the same, but for the
  22.             # source.
  23.   mkdir -p `dirname $2`
  24.   groff -Tascii -mandoc $1 | gzip -9c > $2
  25.   if [ ! "$3" = "" ]; then
  26.     mkdir -p `dirname $3`
  27.     cat $1 > $3 
  28.   fi 
  29. }
  30.  
  31. echo "+============+"
  32. echo "| term-2.3.5 |"
  33. echo "+============+"
  34. mkdir -p $PKG/usr/src
  35. cd $PKG/usr/src
  36. tar xzvf $CWD/term-2.3.5.tar.gz
  37. cp $CWD/configure.slackware term-2.3.5
  38.  
  39. # Build the package:
  40. cd $PKG
  41. tar czvf $TMP/termsrc.tgz .
  42.  
  43. # Clean up the extra stuff:
  44. if [ "$1" = "--cleanup" ]; then
  45.   rm -rf $PKG
  46. fi
  47.