]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed licence, restructured setup_cpack 291/head
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 10 Dec 2014 12:55:35 +0000 (13:55 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Wed, 10 Dec 2014 12:55:35 +0000 (13:55 +0100)
CMakeLists.txt
cmake/cpack-mac-bundle/Info.plist.in [moved from cpack/mac-bundle/Info.plist with 78% similarity]
cmake/cpack-mac-bundle/dealii-icon.icns [moved from cpack/mac-bundle/dealii-icon.icns with 100% similarity]
cmake/cpack-mac-bundle/dealii-terminal.in [moved from cpack/mac-bundle/dealii-terminal with 73% similarity]
cmake/cpack-mac-bundle/dealii.conf.in [moved from cpack/mac-bundle/dealii.conf with 76% similarity]
cmake/cpack-mac-bundle/mac_startup_script.sh.in [new file with mode: 0755]
cmake/setup_cached_variables.cmake
cmake/setup_cpack.cmake [new file with mode: 0644]
cpack/CMakeLists.txt [deleted file]
cpack/mac-bundle/dealii.location [deleted file]
cpack/mac-bundle/mac_startup_script.sh [deleted file]

index 3367111b1f98b3893df25bc2e0456b54385404e9..4a2173045a78f685df9a5fe87f79c2cb7bb449e9 100644 (file)
@@ -129,6 +129,10 @@ INCLUDE(setup_custom_targets)
 INCLUDE(setup_finalize)
 INCLUDE(setup_write_config)
 
+#
+# CPack configuration
+#
+INCLUDE(setup_cpack)
 
 ########################################################################
 #                                                                      #
@@ -163,8 +167,6 @@ IF(DEAL_II_HAVE_TESTS_DIRECTORY AND NOT DEAL_II_MSVC)
   ADD_SUBDIRECTORY(tests)
 ENDIF()
 
-ADD_SUBDIRECTORY(cpack)
-
 #
 # And finally, print the configuration:
 #
similarity index 78%
rename from cpack/mac-bundle/Info.plist
rename to cmake/cpack-mac-bundle/Info.plist.in
index e6625551ac45d877860e655b78c2ea012f63fe5c..d3332c078db1b31ac72371ae44ff7555257eaa97 100644 (file)
@@ -5,9 +5,9 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleExecutable</key>
-       <string>deal.II</string>
+       <string>@DEAL_II_PACKAGE_NAME@</string>
        <key>CFBundleGetInfoString</key>
-       <string>8.2.pre</string>
+       <string>@DEAL_II_PACKAGE_VERSION@</string>
        <key>CFBundleIconFile</key>
        <string>deal.II</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>8.2.pre</string>
+       <string>@DEAL_II_PACKAGE_VERSION@</string>
        <key>CFBundleSignature</key>
-       <string>deal.II</string>
+       <string>@DEAL_II_PACKAGE_NAME@</string>
        <key>CFBundleVersion</key>
-       <string>8.2.pre</string>
+       <string>@DEAL_II_PACKAGE_VERSION@</string>
        <key>NSHumanReadableCopyright</key>
        <string>GPL</string>
        <key>LSMinimumSystemVersion</key>
similarity index 73%
rename from cpack/mac-bundle/dealii-terminal
rename to cmake/cpack-mac-bundle/dealii-terminal.in
index 9fb4533d4040c28c186121d5c0edaf22231da55a..d6bf1848cc017fe98e9eddd78968215252233fbf 100755 (executable)
@@ -1,4 +1,17 @@
 #!/bin/bash
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2014 by the deal.II authors
+##
+## This file is part of the deal.II library. It is a modified version
+## of the file FEniCS terminal from the FEniCS project.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## ---------------------------------------------------------------------
 
 if [ "$BASH_SOURCE" == "$0" ]
 then
@@ -40,7 +53,7 @@ fi
 
 # Everything seems to be okay. Launch a terminal with PATH's
 # set up to work with deal.II.
-CONF=$DEAL_II_RESOURCES/etc/dealii.conf
+CONF=$DEAL_II_RESOURCES/@DEAL_II_COMMON_RELDIR@/dealii.conf
 
 if ! [[ -f $CONF ]]; then
     return=`/usr/bin/osascript <<EOF
similarity index 76%
rename from cpack/mac-bundle/dealii.conf
rename to cmake/cpack-mac-bundle/dealii.conf.in
index 4dcc1c77b4d9d68048c8ec1d4bf4264a255c0c13..a31d84f72ab6e97d066cd065f9052327f4a0e9fb 100644 (file)
@@ -1,3 +1,17 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2014 by the deal.II authors
+##
+## This file is part of the deal.II library. It is a modified version
+## of the file FEniCS terminal from the FEniCS project.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## ---------------------------------------------------------------------
+
 # Make sure DEAL_II_BUNDLE is set correctly
 if [ -z "$DEAL_II_BUNDLE" ]; then 
     export DEAL_II_BUNDLE=/Applications/deal.II.app
@@ -57,7 +71,7 @@ If you want to set up your daily Terminal to work with deal.II, add
 these lines to your ~/.profile file (the first line turns off this message):
   
    export DEAL_II_CONF_SILENT=ON
-   . $DEAL_II_RESOURCES/etc/dealii.conf
+   . $DEAL_II_RESOURCES/@DEAL_II_COMMON_RELDIR@/dealii.conf
 
 EOF
 fi
diff --git a/cmake/cpack-mac-bundle/mac_startup_script.sh.in b/cmake/cpack-mac-bundle/mac_startup_script.sh.in
new file mode 100755 (executable)
index 0000000..dac71f2
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2014 by the deal.II authors
+##
+## This file is part of the deal.II library. It is a modified version
+## of the file FEniCS terminal from the FEniCS project.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## ---------------------------------------------------------------------
+
+
+if [ "$BASH_SOURCE" == "$0" ]
+then
+  export DEAL_II_BUNDLE=`echo "$0" | sed -e 's|/Contents/MacOS/.*||'`
+  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+  open -a /Applications/Utilities/Terminal.app $DEAL_II_RESOURCES/@DEAL_II_EXECUTABLE_RELDIR@/dealii-terminal
+else
+  export DEAL_II_BUNDLE=`echo "$BASH_SOURCE" | sed -e 's|/Contents/MacOS/.*||'`
+  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
+  source $DEAL_II_RESOURCES/@DEAL_II_COMMON_RELDIR@/dealii.conf
+fi
index 3269a0293af6c9bf2e94b33f0040f5b4c97e2f36..1fa62c6af967971a480e00f4aa062ff1e89e51db 100644 (file)
@@ -408,3 +408,11 @@ FOREACH(_var ${_res})
     UNSET(${_var} CACHE)
   ENDIF()
 ENDFOREACH()
+
+# CPack miscellaneous options
+SET(DEAL_II_EXTERNAL_LIBS_TREE "" CACHE PATH
+    "Path to tree of external libraries that will be installed in bundle package."
+  )
+MARK_AS_ADVANCED(DEAL_II_EXTERNAL_LIBS_TREE)
+
+
diff --git a/cmake/setup_cpack.cmake b/cmake/setup_cpack.cmake
new file mode 100644 (file)
index 0000000..ce64da4
--- /dev/null
@@ -0,0 +1,86 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2012 - 2014 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+IF(DEAL_II_COMPONENT_PACKAGE)
+  MESSAGE(STATUS "Setting up CPack")
+  SET(CPACK_GENERATOR "Bundle")
+
+  CONFIGURE_FILE(
+    ${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/mac_startup_script.sh.in
+    ${CMAKE_BINARY_DIR}/cpack/mac_startup_script.sh
+    @ONLY
+  )
+
+  CONFIGURE_FILE(
+    ${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/dealii-terminal.in
+    ${CMAKE_BINARY_DIR}/cpack/dealii-terminal
+    @ONLY
+  )
+
+  CONFIGURE_FILE(
+    ${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/dealii.conf.in
+    ${CMAKE_BINARY_DIR}/cpack/dealii.conf
+    @ONLY
+  )
+
+  CONFIGURE_FILE(
+    ${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/Info.plist.in
+    ${CMAKE_BINARY_DIR}/cpack/Info.plist
+    @ONLY
+  )
+
+  SET(CPACK_PACKAGE_ICON 
+    "${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/dealii-icon.icns"
+  )
+
+  set(CPACK_PACKAGE_FILE_NAME 
+    "${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION}"
+  )
+
+  set(CPACK_BUNDLE_NAME 
+    "${DEAL_II_PACKAGE_NAME}"
+  )
+
+  SET(CPACK_BUNDLE_ICON 
+    "${CMAKE_SOURCE_DIR}/cmake/cpack-mac-bundle/dealii-icon.icns"
+  )
+
+  SET(CPACK_BUNDLE_PLIST 
+    "${CMAKE_BINARY_DIR}/cpack/Info.plist"
+  )
+
+  SET(CPACK_BUNDLE_STARTUP_COMMAND 
+    "${CMAKE_BINARY_DIR}/cpack/mac_startup_script.sh"
+  )
+
+  INSTALL(FILES 
+    ${CMAKE_BINARY_DIR}/cpack/dealii.conf
+    DESTINATION ${DEAL_II_COMMON_RELDIR}
+  )
+
+  INSTALL(PROGRAMS 
+    ${CMAKE_BINARY_DIR}/cpack/dealii-terminal 
+    DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
+  )
+
+  IF(NOT "${DEAL_II_CPACK_EXTERNAL_LIBS_TREE}" STREQUAL "")
+     INSTALL(DIRECTORY ${DEAL_II_EXTERNAL_LIBS_TREE}/ 
+             DESTINATION opt
+             USE_SOURCE_PERMISSIONS)
+  ENDIF()
+
+  INCLUDE(CPack)
+  MESSAGE(STATUS "Setting up CPack - Done")
+ENDIF()
diff --git a/cpack/CMakeLists.txt b/cpack/CMakeLists.txt
deleted file mode 100644 (file)
index 717a8d1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2012 - 2014 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-## The deal.II library is free software; you can use it, redistribute
-## it, and/or modify it under the terms of the GNU Lesser General
-## Public License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-## The full text of the license can be found in the file LICENSE at
-## the top level of the deal.II distribution.
-##
-## ---------------------------------------------------------------------
-
-IF(DEAL_II_COMPONENT_PACKAGE)
-  MESSAGE(STATUS "Setting up CPack")
-  SET(CPACK_GENERATOR "Bundle")
-
-  SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-icon.icns")
-  set(CPACK_PACKAGE_FILE_NAME "${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION}")
-  set(CPACK_BUNDLE_NAME "${DEAL_II_PACKAGE_NAME}")
-  SET(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-icon.icns")
-  SET(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/Info.plist")
-  SET(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/cpack/mac-bundle/mac_startup_script.sh")
-
-  INSTALL(FILES ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii.conf DESTINATION etc/)
-  INSTALL(FILES ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii.location DESTINATION etc/)
-  INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/cpack/mac-bundle/dealii-terminal DESTINATION bin/)
-
-  OPTION(DEAL_II_INSTALLS_EXTERNAL_LIBS
-         "Install external libraries together with deal.II."
-         OFF
-  )
-
-  IF(DEAL_II_INSTALLS_EXTERNAL_LIBS)
-    SET(DEAL_II_EXTERNAL_LIBS_TREE "NOT_SET" CACHE PATH
-       "Path to tree of external libraries that will be installed in bundle package."
-    )
-    INSTALL(DIRECTORY ${DEAL_II_EXTERNAL_LIBS_TREE}/ 
-            DESTINATION opt
-            USE_SOURCE_PERMISSIONS)
-  ENDIF()
-
-  INCLUDE(CPack)
-  MESSAGE(STATUS "Setting up CPack - Done")
-ENDIF()
diff --git a/cpack/mac-bundle/dealii.location b/cpack/mac-bundle/dealii.location
deleted file mode 100644 (file)
index b0910fa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/Applications/deal.II.app
diff --git a/cpack/mac-bundle/mac_startup_script.sh b/cpack/mac-bundle/mac_startup_script.sh
deleted file mode 100755 (executable)
index b98aabd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-function relocate_if_necessary {
-    # If necessary, we relocate the libraries and binaries to the new place, 
-    # by calling install_name_tool on each library in the installation tree
-    OLD=`cat $1/Contents/Resources/etc/dealii.location`
-    if [ ! "$OLD"=="$1" ];then
-       echo $1 > $1/Contents/Resources/etc/dealii.location
-       echo Needs relocation from $OLD to $1!
-    fi  
-    return
-}
-
-if [ "$BASH_SOURCE" == "$0" ]
-then
-  export DEAL_II_BUNDLE=`echo "$0" | sed -e 's|/Contents/MacOS/.*||'`
-  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
-  open -a /Applications/Utilities/Terminal.app $DEAL_II_RESOURCES/bin/dealii-terminal
-else
-  export DEAL_II_BUNDLE=`echo "$BASH_SOURCE" | sed -e 's|/Contents/MacOS/.*||'`
-  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
-  source $DEAL_II_RESOURCES/etc/dealii.conf
-fi

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.