home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / contrib / perl4.036 / slackbui < prev   
Text File  |  1995-10-10  |  2KB  |  68 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-perl
  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/_perl.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 "| perl-4.036 |"
  37. echo "+============+"
  38. cd $TMP
  39. tar xzvf $CWD/perl-4.036.tar.gz
  40. tar xzvf $CWD/perl-4.036-linux-kit.tar.gz
  41. cd perl-4.036
  42. patch <perl.udf
  43. zcat $CWD/perl-4.036.diff.gz | patch -p1
  44. zcat $CWD/perl-4.036.diff2.gz | patch
  45. chmod 755 makedepend
  46. make depend
  47. make
  48. make suidperl
  49. cat perl > $PKG/usr/bin/perl4.036
  50. cat suidperl > $PKG/usr/bin/sperl4.036
  51. cat taintperl > $PKG/usr/bin/tperl4.036
  52. man2gz h2ph.man $PKG/usr/man/preformat/cat1/h2ph.1.gz $SRC/usr/man/man1/h2ph.1
  53. man2gz perl.man $PKG/usr/man/preformat/cat1/perl.1.gz $SRC/usr/man/man1/perl.1
  54. cd x2p
  55. cat a2p > $PKG/usr/bin/a2p
  56. man2gz a2p.man $PKG/usr/man/preformat/cat1/a2p.1.gz $SRC/usr/man/man1/a2p.1
  57. man2gz s2p.man $PKG/usr/man/preformat/cat1/s2p.1.gz $SRC/usr/man/man1/s2p.1
  58.  
  59. # Build the package:
  60. cd $PKG
  61. tar czvf $TMP/perl.tgz .
  62.  
  63. # Clean up the extra stuff:
  64. if [ "$1" = "--cleanup" ]; then
  65.   rm -rf $TMP/perl-4.036
  66.   rm -rf $PKG
  67. fi
  68.