home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / PPP / SLACKBUI < prev   
Encoding:
Text File  |  1995-04-20  |  1.5 KB  |  72 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-ppp
  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/_ppp.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 "| ppp-2.1.2b |"
  37. echo "+============+"
  38. cd $TMP
  39. tar xzvf $CWD/ppp-2.1.2b.tar.gz
  40. cd ppp-2.1.2b
  41. cd pppd
  42. ln -sf Makefile.linux Makefile
  43. make clean
  44. make
  45. strip pppd
  46. cat pppd > $PKG/usr/lib/ppp/pppd
  47. man2gz pppd.8 $PKG/usr/man/preformat/cat8/pppd.8.gz $SRC/usr/man/man8/pppd.8
  48. cd ../chat
  49. zcat $CWD/ppp-2.1.2b.chatdiff.gz | patch
  50. ln -sf Makefile.linux Makefile
  51. rm -f chat.o chat
  52. make
  53. strip chat
  54. cat chat > $PKG/usr/lib/ppp/chat
  55. man2gz chat.8 $PKG/usr/man/preformat/cat8/chat.8.gz $SRC/usr/man/man8/chat.8
  56. cd ../pppstats
  57. patch < README.Linux
  58. ln -sf Makefile.linux Makefile
  59. make
  60. strip pppstats
  61. cat pppstats > $PKG/usr/lib/ppp/pppstats
  62.  
  63. # Build the package:
  64. cd $PKG
  65. tar czvf $TMP/ppp.tgz .
  66.  
  67. # Clean up the extra stuff:
  68. if [ "$1" = "--cleanup" ]; then
  69.   rm -rf $TMP/ppp-2.1.2b
  70.   rm -rf $PKG
  71. fi
  72.