cmake_release_cygwin.sh 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #!/bin/sh
  2. #
  3. # CMake Cygwin package creation script. Run this in an empty
  4. # directory from a separate CMake checkout.
  5. #
  6. CVS_TAG="-r Release-1-4"
  7. PKG=cmake
  8. VER=1.4.5
  9. REL=1
  10. CVSROOT=":pserver:[email protected]:/cvsroot/CMake"
  11. FULLPKG="${PKG}-${VER}-${REL}"
  12. SELF_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
  13. WriteREADME()
  14. {
  15. cat > ${PKG}-${VER}/CYGWIN-PATCHES/cmake.README <<EOF
  16. cmake
  17. --------------------------------------
  18. Runtime requirements:
  19. cygwin-1.3.5 or newer
  20. Build requirements
  21. cygwin-1.3.5 or newer
  22. make
  23. Canonical homepage:
  24. http://www.cmake.org
  25. Canonical download:
  26. ftp://www.cmake.org/pub/cmake/
  27. ------------------------------------
  28. Build instructions:
  29. unpack ${FULLPKG}-src.tar.bz2
  30. if you use setup to install this src package, it will be
  31. unpacked under /usr/src automatically
  32. cd /usr/src
  33. ./${FULLPKG}.sh all
  34. This will create:
  35. /usr/src/${FULLPKG}.tar.bz2
  36. /usr/src/${FULLPKG}-src.tar.bz2
  37. -------------------------------------------
  38. Port Notes:
  39. <none>
  40. ------------------
  41. Cygwin port maintained by: CMake Developers <[email protected]>
  42. EOF
  43. }
  44. WriteSetupHint()
  45. {
  46. cat > ${PKG}-${VER}/CYGWIN-PATCHES/setup.hint <<EOF
  47. # CMake setup.hint file for cygwin setup.exe program
  48. category: Devel
  49. requires: libncurses5 cygwin
  50. sdesc: "A cross platform build manger"
  51. ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files."
  52. curr: ${VER}-${REL}
  53. EOF
  54. }
  55. SourceTarball()
  56. {
  57. cvs -z3 -d ${CVSROOT} export ${CVS_TAG} CMake &&
  58. mv CMake ${PKG}-${VER} &&
  59. tar cvjf ${PKG}-${VER}.tar.bz2 ${PKG}-${VER}
  60. }
  61. SourcePatch()
  62. {
  63. mv ${PKG}-${VER} ${PKG}-${VER}-orig &&
  64. tar xvjf ${PKG}-${VER}.tar.bz2 &&
  65. mkdir -p ${PKG}-${VER}/CYGWIN-PATCHES &&
  66. WriteREADME &&
  67. WriteSetupHint &&
  68. cp ${PKG}-${VER}/Utilities/setup.hint ${PKG}-${VER}/CYGWIN-PATCHES &&
  69. (diff -urN "${PKG}-${VER}-orig" "${PKG}-${VER}" > "${FULLPKG}.patch")
  70. rm -rf ${PKG}-${VER} ${PKG}-${VER}-orig
  71. }
  72. CygwinScript()
  73. {
  74. cp ${SELF_DIR}/cmake-cygwin-package.sh ./${FULLPKG}.sh
  75. chmod u+x ./${FULLPKG}.sh
  76. }
  77. Package()
  78. {
  79. ./${FULLPKG}.sh all
  80. }
  81. SourceTarball && SourcePatch && CygwinScript && Package