home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TRN / SLACKBUI < prev    next >
Encoding:
Text File  |  1995-04-20  |  1.8 KB  |  66 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-trn-nntp
  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/_trn-nntp.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 "| trn-3.6 for NNTP (with mthreads/Overviews) |"
  37. echo "+============================================+"
  38. cd $TMP
  39. tar xzvf $CWD/trn-3.6.tar.gz
  40. cd trn-3.6
  41. zcat $CWD/trn-3.6.nntp.diff.gz | patch -p1
  42. make
  43. cat Pnews > $PKG/usr/bin/Pnews
  44. cat Rnmail > $PKG/usr/bin/Rnmail
  45. cat newsetup > $PKG/usr/bin/newsetup
  46. cat newsgroups > $PKG/usr/bin/newsgroups
  47. cat nntplist > $PKG/usr/bin/nntplist
  48. cat trn > $PKG/usr/bin/trn
  49. cat trn-artchk > $PKG/usr/bin/trn-artchk
  50. cat trn > $PKG/usr/bin/trn
  51. man2gz Pnews.1 $PKG/usr/man/preformat/cat1/Pnews.1.gz $SRC/usr/man/man1/Pnews.1
  52. man2gz Rnmail.1 $PKG/usr/man/preformat/cat1/Rnmail.1.gz $SRC/usr/man/man1/Rnmail.1
  53. man2gz newsetup.1 $PKG/usr/man/preformat/cat1/newsetup.1.gz $SRC/usr/man/man1/newsetup.1
  54. man2gz newsgroups.1 $PKG/usr/man/preformat/cat1/newsgroups.1.gz $SRC/usr/man/man1/newsgroups.1
  55. man2gz trn.1 $PKG/usr/man/preformat/cat1/trn.1.gz $SRC/usr/man/man1/trn.1
  56.  
  57. # Build the package:
  58. cd $PKG
  59. tar czvf $TMP/trn-nntp.tgz .
  60.  
  61. # Clean up the extra stuff:
  62. if [ "$1" = "--cleanup" ]; then
  63.   rm -rf $TMP/trn-3.6
  64.   rm -rf $PKG
  65. fi
  66.