Browse Source

ENH: add support files for cpack cygwin setup package stuff

Bill Hoffman 19 years ago
parent
commit
22767f7e3f

+ 25 - 0
Utilities/Release/Cygwin/CMakeLists.txt

@@ -0,0 +1,25 @@
+FILE(GLOB INSTALLED_CURSES /usr/bin/cygncurses*.dll)
+SET(MAX 0)
+FOREACH(f ${INSTALLED_CURSES})
+  IF(NOT "${f}" MATCHES "\\+")
+    STRING(REGEX REPLACE ".*([0-9]).dll" "\\1" NUMBER "${f}")
+    IF(NUMBER GREATER MAX)
+      SET(MAX ${NUMBER}) 
+    ENDIF(NUMBER GREATER MAX)
+  ENDIF(NOT "${f}" MATCHES "\\+")
+ENDFOREACH(f)
+STRING(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
+SET(CMAKE_NCURSES_VERSION "libncurses${MAX}")
+MESSAGE(STATUS "Using curses version: libncurses${MAX}")
+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@-@[email protected]")
+INSTALL_FILES(/share/doc/Cygwin FILES
+  ${CMake_BINARY_DIR}/Docs/@CYGWIN_PACKAGE_NAME@-@[email protected]
+  )
+CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
+  ${CPACK_CYGWIN_BUILD_SCRIPT})
+CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
+  ${CPACK_CYGWIN_PATCH_FILE})
+

+ 42 - 0
Utilities/Release/Cygwin/README.cygwin.in

@@ -0,0 +1,42 @@
+cmake
+--------------------------------------
+Runtime requirements:
+  cygwin-1.5.21(0.156/4/2) or newer
+
+Build requirements
+  cygwin-1.5.21(0.156/4/2) or newer
+  make
+
+Canonical homepage:
+  http://www.cmake.org
+
+Canonical download:
+  ftp://www.cmake.org/pub/cmake/
+
+------------------------------------
+
+Build instructions:
+  unpack @[email protected]
+    if you use setup to install this src package, it will be
+         unpacked under /usr/src automatically
+  cd /usr/src
+  ./@[email protected]
+
+This will create:
+  /usr/src/@[email protected]
+  /usr/src/@[email protected]
+
+-------------------------------------------
+
+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
+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
+proper include path when the files are needed.
+
+------------------
+
+Cygwin port maintained by: CMake Developers <[email protected]>

+ 13 - 0
Utilities/Release/Cygwin/cygwin-package.sh.in

@@ -0,0 +1,13 @@
+tdir=`pwd`
+tar xvfj @[email protected] &&
+cd @CYGWIN_SRC_PACKAGE_NAME@ && 
+mkdir .build &&
+cd .build &&
+../bootstrap --parallel=2 && 
+make -j2 && 
+make test && 
+./bin/cpack && 
+./bin/cpack --config  CPackSourceConfig.cmake
+
+mv @CYGWIN_SRC_PACKAGE_NAME@-@[email protected] "$tdir"
+mv @CYGWIN_PACKAGE_NAME@-@[email protected] "$tdir"

+ 0 - 0
Utilities/Release/Cygwin/cygwin-patch.diff.in


+ 5 - 0
Utilities/Release/Cygwin/cygwin-setup.hint.in

@@ -0,0 +1,5 @@
+# CMake setup.hint file for cygwin setup.exe program
+category: Devel 
+requires: @CMAKE_NCURSES_VERSION@ cygwin
+sdesc: "A cross platform build manager" 
+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."