home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / inn / slackbui < prev   
Text File  |  1995-10-10  |  3KB  |  99 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-inn
  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/_inn.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 "| inn1.4 |"
  37. echo "+========+"
  38. cd $TMP
  39. tar xzvf $CWD/inn1.4.tar.gz
  40. cd inn
  41. make all
  42. cd frontends
  43. cat inews > $PKG/usr/lib/news/inews
  44. cat rnews > $PKG/usr/lib/news/rnews
  45. cat ctlinnd > $PKG/usr/lib/news/bin/ctlinnd
  46. cat getlist > $PKG/usr/lib/news/bin/getlist
  47. cat innconfval > $PKG/usr/lib/news/bin/innconfval
  48. cat encode > $PKG/usr/lib/news/bin/rnews/encode
  49. cat decode > $PKG/usr/lib/news/bin/rnews/decode
  50. cd ../backends
  51. cat archive > $PKG/usr/lib/news/bin/archive
  52. cat batcher > $PKG/usr/lib/news/bin/batcher
  53. cat buffchan > $PKG/usr/lib/news/bin/buffchan
  54. cat cvtbatch > $PKG/usr/lib/news/bin/cvtbatch
  55. cat filechan > $PKG/usr/lib/news/bin/filechan
  56. cat innxmit > $PKG/usr/lib/news/bin/innxmit
  57. cat nntpget > $PKG/usr/lib/news/bin/nntpget
  58. cat overchan > $PKG/usr/lib/news/bin/overchan
  59. cat shlock > $PKG/usr/lib/news/bin/shlock
  60. cat shrinkfile > $PKG/usr/lib/news/bin/shrinkfile
  61. cd ../expire
  62. cat convdate > $PKG/usr/lib/news/bin/convdate
  63. cat expire > $PKG/usr/lib/news/bin/expire
  64. cat expireover > $PKG/usr/lib/news/bin/expireover
  65. cat fastrm > $PKG/usr/lib/news/bin/fastrm
  66. cat grephistory > $PKG/usr/lib/news/bin/grephistory
  67. cat makeactive > $PKG/usr/lib/news/bin/makeactive
  68. cat makehistory > $PKG/usr/lib/news/bin/makehistory
  69. cat newsrequeue > $PKG/usr/lib/news/bin/newsrequeue
  70. cat prunehistory > $PKG/usr/lib/news/bin/prunehistory
  71. cd ../innd
  72. cat innd > $PKG/usr/lib/news/etc/innd
  73. cat inndstart > $PKG/usr/lib/news/etc/inndstart
  74. cd ../nnrpd
  75. cat nnrpd > $PKG/usr/lib/news/etc/in.nnrpd
  76. cd ../doc
  77. for page in *.1 ; do
  78.   cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
  79. done
  80. for page in *.3 ; do
  81.   cat $page | gzip -9c > $PKG/usr/man/man3/$page.gz
  82. done
  83. for page in *.5 ; do
  84.   cat $page | gzip -9c > $PKG/usr/man/man5/$page.gz
  85. done
  86. for page in *.8 ; do
  87.   cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz
  88. done
  89.  
  90. # Build the package:
  91. cd $PKG
  92. tar czvf $TMP/inn.tgz .
  93.  
  94. # Clean up the extra stuff:
  95. if [ "$1" = "--cleanup" ]; then
  96.   rm -rf $TMP/inn
  97.   rm -rf $PKG
  98. fi
  99.