home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / A / BASE / SLACKBUI < prev    next >
Encoding:
Text File  |  1995-04-20  |  3.4 KB  |  109 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-base
  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/_base.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 "| mtools-2.0.7 |"
  37. echo "+==============+"
  38. cd $TMP
  39. tar xzvf $CWD/mtools-2.0.7.tar.gz
  40. cd mtools-2.0.7
  41. zcat $CWD/mtools-2.0.7.diff.gz | patch
  42. make
  43. strip mtools
  44. cat mtools > $PKG/usr/bin/mtools
  45. man2gz mattrib.1 $PKG/usr/man/preformat/cat1/mattrib.1.gz $SRC/usr/man/man1/mattrib.1
  46. man2gz mcd.1 $PKG/usr/man/preformat/cat1/mcd.1.gz $SRC/usr/man/man1/mcd.1
  47. man2gz mcopy.1 $PKG/usr/man/preformat/cat1/mcopy.1.gz $SRC/usr/man/man1/mcopy.1
  48. man2gz mdel.1 $PKG/usr/man/preformat/cat1/mdel.1.gz $SRC/usr/man/man1/mdel.1
  49. man2gz mdir.1 $PKG/usr/man/preformat/cat1/mdir.1.gz $SRC/usr/man/man1/mdir.1
  50. man2gz mformat.1 $PKG/usr/man/preformat/cat1/mformat.1.gz $SRC/usr/man/man1/mformat.1
  51. man2gz mkmanifest.1 $PKG/usr/man/preformat/cat1/mkmanifest.1.gz $SRC/usr/man/man1/mkmanifest.1
  52. man2gz mlabel.1 $PKG/usr/man/preformat/cat1/mlabel.1.gz $SRC/usr/man/man1/mlabel.1
  53. man2gz mmd.1 $PKG/usr/man/preformat/cat1/mmd.1.gz $SRC/usr/man/man1/mmd.1
  54. man2gz mrd.1 $PKG/usr/man/preformat/cat1/mrd.1.gz $SRC/usr/man/man1/mrd.1
  55. man2gz mread.1 $PKG/usr/man/preformat/cat1/mread.1.gz $SRC/usr/man/man1/mread.1
  56. man2gz mren.1 $PKG/usr/man/preformat/cat1/mren.1.gz $SRC/usr/man/man1/mren.1
  57. man2gz mtools.1 $PKG/usr/man/preformat/cat1/mtools.1.gz $SRC/usr/man/man1/mtools.1
  58. man2gz mtype.1 $PKG/usr/man/preformat/cat1/mtype.1.gz $SRC/usr/man/man1/mtype.1
  59. man2gz mwrite.1 $PKG/usr/man/preformat/cat1/mwrite.1.gz $SRC/usr/man/man1/mwrite.1
  60.  
  61. echo "+===============+"
  62. echo "| todos/fromdos |"
  63. echo "+===============+"
  64. cd $TMP 
  65. tar xzvf $CWD/todos.tar.gz
  66. cd todos
  67. cc -O2 -s -o todos todos.c
  68. cat todos > $PKG/usr/bin/fromdos
  69.  
  70. echo "+=====+"
  71. echo "| zip |"
  72. echo "+=====+"
  73. mkdir -p $TMP/zip
  74. cd $TMP/zip
  75. unzip $CWD/zip201.zip
  76. make linux
  77. cat zip > $PKG/usr/bin/zip
  78. cat zipnote > $PKG/usr/bin/zipnote
  79. cat zipsplit > $PKG/usr/bin/zipsplit
  80. man2gz zip.1 $PKG/usr/man/preformat/cat1/zip.1.gz $SRC/usr/man/man1/zip.1
  81. man2gz zipgrep.1 $PKG/usr/man/preformat/cat1/zipgrep.1.gz $SRC/usr/man/man1/zipgrep.1
  82.  
  83. echo "+=======+"
  84. echo "| unzip |"
  85. echo "+=======+"
  86. mkdir -p $TMP/unzip
  87. cd $TMP/unzip
  88. unzip $CWD/unzip512.zip
  89. make -f unix/Makefile linux
  90. cat unzip > $PKG/usr/bin/unzip
  91. cat unzipsfx > $PKG/usr/bin/unzipsfx
  92. cat funzip > $PKG/usr/bin/funzip
  93. man2gz unix/funzip.1 $PKG/usr/man/preformat/cat1/funzip.1.gz $SRC/usr/man/man1/funzip.1
  94. man2gz unix/unzip.1 $PKG/usr/man/preformat/cat1/unzip.1.gz $SRC/usr/man/man1/unzip.1
  95. man2gz unix/unzipsfx.1 $PKG/usr/man/preformat/cat1/unzipsfx.1.gz $SRC/usr/man/man1/unzipsfx.1
  96.  
  97. # Build the package:
  98. cd $PKG
  99. tar czvf $TMP/base.tgz .
  100.  
  101. # Clean up the extra stuff:
  102. if [ "$1" = "--cleanup" ]; then
  103.   rm -rf $TMP/mtools-2.0.7
  104.   rm -rf $TMP/todos
  105.   rm -rf $TMP/zip
  106.   rm -rf $TMP/unzip
  107.   rm -rf $PKG
  108. fi
  109.