[cmake-commits] hoffman committed CMakeLists.txt 1.1 1.2 README.cygwin.in 1.1 1.2 cygwin-package.sh.in 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 2 14:40:28 EST 2007


Update of /cvsroot/CMake/CMake/Utilities/Release/Cygwin
In directory public:/mounts/ram/cvs-serv6154/Utilities/Release/Cygwin

Modified Files:
	CMakeLists.txt README.cygwin.in cygwin-package.sh.in 
Log Message:
ENH: add support for cygwin source and binary packaging


Index: cygwin-package.sh.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/Release/Cygwin/cygwin-package.sh.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cygwin-package.sh.in	31 Jan 2007 21:48:22 -0000	1.1
+++ cygwin-package.sh.in	2 Feb 2007 19:40:26 -0000	1.2
@@ -1,13 +1,90 @@
-tdir=`pwd`
-tar xvfj @CYGWIN_SRC_PACKAGE_NAME at .tar.bz2 &&
-cd @CYGWIN_SRC_PACKAGE_NAME@ && 
-mkdir .build &&
-cd .build &&
-../bootstrap --parallel=2 && 
-make -j2 && 
-make test && 
-./bin/cpack && 
-./bin/cpack --config  CPackSourceConfig.cmake
+TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
 
-mv @CYGWIN_SRC_PACKAGE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$tdir"
-mv @CYGWIN_PACKAGE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$tdir"
+# create build directory
+mkdirs()
+{
+  (
+  mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" 
+  )
+}
+
+# cd into 
+# untar source tree and apply patch
+prep()
+{
+  (
+  cd "$TOP_DIR" &&
+  tar xvfj @CPACK_PACKAGE_FILE_NAME at .tar.bz2
+  patch -p0 < "@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .patch" &&
+  mkdirs
+  )
+}
+
+conf()
+{
+  (
+  cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && 
+  ../bootstrap --parallel=2
+  )
+}
+
+build()
+{
+  (
+  cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+  make -j2 &&
+  make test
+  )
+}
+
+clean()
+{
+  (
+  cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+  make clean
+  )
+}
+
+pkg()
+{
+  (
+  cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+  ./bin/cpack && 
+  mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$TOP_DIR"     
+  )
+}
+
+spkg()
+{
+ (
+  cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+  ./bin/cpack --config  CPackSourceConfig.cmake &&
+  mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$TOP_DIR" 
+  )
+}
+
+finish()
+{
+  (
+  rm -rf "@CPACK_PACKAGE_FILE_NAME@"
+  )
+}
+
+case $1 in
+  prep)         prep    ; STATUS=$? ;;
+  mkdirs)       mkdirs  ; STATUS=$? ;;
+  conf)         conf    ; STATUS=$? ;;
+  build)        build   ; STATUS=$? ;;
+  clean)        clean   ; STATUS=$? ;;
+  package)      pkg     ; STATUS=$? ;;
+  pkg)          pkg     ; STATUS=$? ;;
+  src-package)  spkg    ; STATUS=$? ;;
+  spkg)         spkg    ; STATUS=$? ;;
+  finish)       finish  ; STATUS=$? ;;
+  all) (
+       prep && conf && build && pkg && spkg && finish ;
+       STATUS=$?
+       ) ;;
+  *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;;
+esac
+exit ${STATUS}

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/Release/Cygwin/CMakeLists.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CMakeLists.txt	31 Jan 2007 21:48:22 -0000	1.1
+++ CMakeLists.txt	2 Feb 2007 19:40:26 -0000	1.2
@@ -14,9 +14,9 @@
 CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
   "${CMake_BINARY_DIR}/setup.hint")
 CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
-  "${CMake_BINARY_DIR}/Docs/@CYGWIN_PACKAGE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .README")
+  "${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .README")
 INSTALL_FILES(/share/doc/Cygwin FILES
-  ${CMake_BINARY_DIR}/Docs/@CYGWIN_PACKAGE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .README
+  ${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .README
   )
 CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
   ${CPACK_CYGWIN_BUILD_SCRIPT})

Index: README.cygwin.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/Release/Cygwin/README.cygwin.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- README.cygwin.in	31 Jan 2007 21:48:22 -0000	1.1
+++ README.cygwin.in	2 Feb 2007 19:40:26 -0000	1.2
@@ -16,22 +16,22 @@
 ------------------------------------
 
 Build instructions:
-  unpack @CYGWIN_SRC_PACKAGE_NAME at .tar.bz2
+  unpack @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2
     if you use setup to install this src package, it will be
          unpacked under /usr/src automatically
   cd /usr/src
-  ./@CYGWIN_PACKAGE_NAME at .sh
+  ./@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .sh all
 
 This will create:
-  /usr/src/@CYGWIN_PACKAGE_NAME at .tar.bz2
-  /usr/src/@CYGWIN_SRC_PACKAGE_NAME at .tar.bz2
+  /usr/src/@CPACK_PACKAGE_FILE_NAME at .tar.bz2
+  /usr/src/@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2
 
 -------------------------------------------
 
 Port Notes:
 
-The directory /usr/share/@CPACK_CYGWIN_NAME@/include is purposely not
-located at /usr/include/@CPACK_CYGWIN_NAME@ or /usr/include/cmake.  The
+The directory /usr/share/@CPACK_PACKAGE_FILE_NAME@/include is purposely not
+located at /usr/include/@CPACK_PACKAGE_FILE_NAME@ or /usr/include/cmake.  The
 files it contains are not meant for inclusion in any C or C++ program.
 They are used for compiling dynamically loadable CMake commands inside
 projects that provide them.  CMake will automatically provide the



More information about the Cmake-commits mailing list