makepack 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/sh
  2. #
  3. # Shell script to make a FPK package for Linux
  4. # Michael Van Canneyt, 1996-1999
  5. #
  6. # Set some environment vars to suit the setup
  7. VERSION=0.99.12
  8. FPCDIR=fpc-$VERSION
  9. LIBS=/usr/lib/fpc/$VERSION
  10. #LIBS=/usr/lib/fpc/aout/$VERSION
  11. SRC=/usr/src/fpc-$VERSION
  12. DOCS=/usr/doc/fpc-$VERSION
  13. DEMO=$SRC/demo
  14. PPUMOVE=/usr/bin/ppumove
  15. PPUDUMP=/usr/bin/ppumove
  16. H2PAS=/usr/bin/h2pas
  17. PTOP=/usr/bin/ptop
  18. PPDEP=/usr/bin/ppdep
  19. # the following should be ELF or aout
  20. RELEASE=ELF
  21. #RELEASE=aout
  22. echo Using the following params :
  23. echo
  24. echo Version is : $VERSION , system : $RELEASE
  25. echo Libs are in $LIBS
  26. echo Sources are in $SRC
  27. echo Documentation is in $DOCS
  28. echo Demos are in $DEMO
  29. echo ppudump is $PPUDUMP
  30. echo ppumove is $PPUMOVE
  31. echo ptop is $PTOP
  32. echo h2pas is $H2PAS
  33. echo ppdep is $PPDEP
  34. echo
  35. echo making in directory $FPCDIR
  36. echo
  37. # do what is necessary...
  38. # first, make all needed things
  39. echo Creating directory $FPCDIR
  40. mkdir $FPCDIR
  41. echo Making sources package.
  42. rm -f `find $SRC -name '.#*'`
  43. rm -rf `find $SRC -name CVS -type d`
  44. tar -cvzf $FPCDIR/sources.tar.gz --exclude CVS -C $SRC base rtl docs compiler utils >sources.list
  45. echo Making libs package.
  46. # No gzip, because then we cannot add libgcc.
  47. tar -cvf $FPCDIR/libs.tar -C $LIBS . >libs.list
  48. # Add libfpc.so !!
  49. #tar -rvf $FPCDIR/libs.tar -C /usr/lib libfpc.so >libs.list
  50. # We have to add libgcc.a to this package. (not everyone has GCC installed !)
  51. #tar -rvf $FPCDIR/libs.tar -C $LIBGCCPATH libgcc.a >>libs.list
  52. # only now we gzip the libs.tar
  53. gzip $FPCDIR/libs.tar
  54. echo Making bins package.
  55. tar -cvf $FPCDIR/bins.tar -C `dirname $PPUMOVE` ppumove >bins.list
  56. tar -rvf $FPCDIR/bins.tar -C `dirname $PPUDUMP` ppudump >>bins.list
  57. tar -rvf $FPCDIR/bins.tar -C `dirname $H2PAS` h2pas >>bins.list
  58. tar -rvf $FPCDIR/bins.tar -C `dirname $PTOP` ptop >>bins.list
  59. tar -rvf $FPCDIR/bins.tar -C `dirname $PPDEP` ppdep >>bins.list
  60. gzip $FPCDIR/bins.tar
  61. echo Making docs package.
  62. rm -f `find $DOCS -name '.#*'`
  63. tar -cvzf $FPCDIR/docs.tar.gz --exclude CVS -C $DOCS . >docs.list
  64. echo Making demo package.
  65. tar -cvzf $FPCDIR/demo.tar.gz --exclude CVS -C $DEMO . >demo.list
  66. echo Copying install files.
  67. cp install.sh $FPCDIR
  68. # then, pack everything together.
  69. echo Putting everything together.
  70. tar -cf fpc-$VERSION.$RELEASE.tar $FPCDIR
  71. #cp $FPCDIR/* /home/ftp/pub/fpc/dist/separate
  72. echo Removing directory $FPCDIR.
  73. rm -rf $FPCDIR
  74. # that's it.
  75. echo Done.