home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / ap / workbone / slackbui next >
Text File  |  1995-10-10  |  1KB  |  58 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-workbone
  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. # Function to handle manpage source:
  20. man2gz () { # $1 is source page name, $2 is target name for preformatted
  21.             # output (full path && name) and $3 is the same, but for the
  22.             # source.
  23.   mkdir -p `dirname $2`
  24.   groff -Tascii -mandoc $1 | gzip -9c > $2
  25.   if [ ! "$3" = "" ]; then
  26.     mkdir -p `dirname $3`
  27.     cat $1 > $3 
  28.   fi 
  29. }
  30.  
  31. echo "+==============+"
  32. echo "| WorkBone-2.3 |"
  33. echo "+==============+"
  34. cd $TMP
  35. tar xzvf $CWD/WorkBone-2.3.tar.gz
  36. cd WorkBone-2.3
  37. make
  38. mkdir -p $PKG/usr/bin
  39. mkdir -p $PKG/usr/doc/WorkBone-2.3
  40. cat workbone > $PKG/usr/bin/workbone
  41. chmod 755 $PKG/usr/bin/workbone
  42. chown root.bin $PKG/usr/bin/workbone
  43. mkdir -p $PKG/usr/man/man1
  44. cat workbone.1 | gzip -9c > $PKG/usr/man/man1/workbone.1.gz
  45. cat README > $PKG/usr/doc/WorkBone-2.3/README
  46. chmod 644 $PKG/usr/doc/WorkBone-2.3/README
  47. chown root.bin $PKG/usr/doc/WorkBone-2.3/README
  48.  
  49. # Build the package:
  50. cd $PKG
  51. tar czvf $TMP/workbone.tgz .
  52.  
  53. # Clean up the extra stuff:
  54. if [ "$1" = "--cleanup" ]; then
  55.   rm -rf $TMP/WorkBone-2.3
  56.   rm -rf $PKG
  57. fi
  58.