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

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-ps
  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/_ps.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 "| procps-0.97 |"
  37. echo "+=============+"
  38. cd $TMP
  39. tar xzvf $CWD/procps-0.97.tar.gz
  40. cd procps-0.97
  41. zcat $CWD/procps-0.97.diff.gz | patch
  42. make
  43. cat free > $PKG/bin/free
  44. cat killall > $PKG/bin/killall
  45. cat ps > $PKG/bin/ps
  46. cat psupdate > $PKG/usr/sbin/psupdate
  47. cat fuser > $PKG/usr/bin/fuser
  48. cat pstree > $PKG/usr/bin/pstree
  49. cat tload > $PKG/usr/bin/tload
  50. cat top > $PKG/usr/bin/top
  51. cat uptime > $PKG/usr/bin/uptime
  52. cat vmstat > $PKG/usr/bin/vmstat
  53. cat w > $PKG/usr/bin/w.procps
  54. man2gz free.1 $PKG/usr/man/preformat/cat1/free.1.gz $SRC/usr/man/man1/free.1
  55. man2gz fuser.1 $PKG/usr/man/preformat/cat1/fuser.1.gz $SRC/usr/man/man1/fuser.1
  56. man2gz killall.1 $PKG/usr/man/preformat/cat1/killall.1.gz $SRC/usr/man/man1/killall.1
  57. man2gz ps.1 $PKG/usr/man/preformat/cat1/ps.1.gz $SRC/usr/man/man1/ps.1
  58. man2gz pstree.1 $PKG/usr/man/preformat/cat1/pstree.1.gz $SRC/usr/man/man1/pstree.1
  59. man2gz psupdate.8 $PKG/usr/man/preformat/cat8/psupdate.8.gz $SRC/usr/man/man8/psupdate.8
  60. man2gz tload.1 $PKG/usr/man/preformat/cat1/tload.1.gz $SRC/usr/man/man1/tload.1
  61. man2gz top.1 $PKG/usr/man/preformat/cat1/top.1.gz $SRC/usr/man/man1/top.1
  62. man2gz uptime.1 $PKG/usr/man/preformat/cat1/uptime.1.gz $SRC/usr/man/man1/uptime.1
  63. man2gz vmstat.8 $PKG/usr/man/preformat/cat8/vmstat.8.gz $SRC/usr/man/man8/vmstat.8
  64. man2gz w.1 $PKG/usr/man/preformat/cat1/w.1.gz $SRC/usr/man/man1/w.1
  65.  
  66. echo "+===========+"
  67. echo "| w.bassman |"
  68. echo "+===========+"
  69. tar xzvf $CWD/w.bassman.tar.gz
  70. gcc -s -O2 -o w.bassman sysinfo.c whattime.c w.bassman.c
  71. cat w.bassman > $PKG/usr/bin/w.bassman
  72. man2gz w.bassman.1 $PKG/usr/man/preformat/cat1/w.bassman.1.gz $SRC/usr/man/man1/w.bassman.1
  73.  
  74. # Build the package:
  75. cd $PKG
  76. tar czvf $TMP/ps.tgz .
  77.  
  78. # Clean up the extra stuff:
  79. if [ "$1" = "--cleanup" ]; then
  80.   rm -rf $TMP/procps-0.97
  81.   rm -rf $PKG
  82. fi
  83.