makepack 2.2 KB

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