From 2fb5390364554223e66220f674a13fc8d907a81e Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Wed, 10 Dec 2014 13:55:35 +0100 Subject: [PATCH] Fixed licence, restructured setup_cpack --- CMakeLists.txt | 6 +- .../cpack-mac-bundle/Info.plist.in | 10 +- .../cpack-mac-bundle}/dealii-icon.icns | Bin .../cpack-mac-bundle/dealii-terminal.in | 15 ++- .../cpack-mac-bundle/dealii.conf.in | 16 +++- .../cpack-mac-bundle/mac_startup_script.sh.in | 26 ++++++ cmake/setup_cached_variables.cmake | 8 ++ cmake/setup_cpack.cmake | 86 ++++++++++++++++++ cpack/CMakeLists.txt | 47 ---------- cpack/mac-bundle/dealii.location | 1 - cpack/mac-bundle/mac_startup_script.sh | 23 ----- 11 files changed, 158 insertions(+), 80 deletions(-) rename cpack/mac-bundle/Info.plist => cmake/cpack-mac-bundle/Info.plist.in (78%) rename {cpack/mac-bundle => cmake/cpack-mac-bundle}/dealii-icon.icns (100%) rename cpack/mac-bundle/dealii-terminal => cmake/cpack-mac-bundle/dealii-terminal.in (73%) rename cpack/mac-bundle/dealii.conf => cmake/cpack-mac-bundle/dealii.conf.in (76%) create mode 100755 cmake/cpack-mac-bundle/mac_startup_script.sh.in create mode 100644 cmake/setup_cpack.cmake delete mode 100644 cpack/CMakeLists.txt delete mode 100644 cpack/mac-bundle/dealii.location delete mode 100755 cpack/mac-bundle/mac_startup_script.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 3367111b1f..4a2173045a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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: # diff --git a/cpack/mac-bundle/Info.plist b/cmake/cpack-mac-bundle/Info.plist.in similarity index 78% rename from cpack/mac-bundle/Info.plist rename to cmake/cpack-mac-bundle/Info.plist.in index e6625551ac..d3332c078d 100644 --- a/cpack/mac-bundle/Info.plist +++ b/cmake/cpack-mac-bundle/Info.plist.in @@ -5,9 +5,9 @@ CFBundleDevelopmentRegion English CFBundleExecutable - deal.II + @DEAL_II_PACKAGE_NAME@ CFBundleGetInfoString - 8.2.pre + @DEAL_II_PACKAGE_VERSION@ CFBundleIconFile deal.II CFBundleIdentifier @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 8.2.pre + @DEAL_II_PACKAGE_VERSION@ CFBundleSignature - deal.II + @DEAL_II_PACKAGE_NAME@ CFBundleVersion - 8.2.pre + @DEAL_II_PACKAGE_VERSION@ NSHumanReadableCopyright GPL LSMinimumSystemVersion diff --git a/cpack/mac-bundle/dealii-icon.icns b/cmake/cpack-mac-bundle/dealii-icon.icns similarity index 100% rename from cpack/mac-bundle/dealii-icon.icns rename to cmake/cpack-mac-bundle/dealii-icon.icns diff --git a/cpack/mac-bundle/dealii-terminal b/cmake/cpack-mac-bundle/dealii-terminal.in similarity index 73% rename from cpack/mac-bundle/dealii-terminal rename to cmake/cpack-mac-bundle/dealii-terminal.in index 9fb4533d40..d6bf1848cc 100755 --- a/cpack/mac-bundle/dealii-terminal +++ b/cmake/cpack-mac-bundle/dealii-terminal.in @@ -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 < $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 -- 2.39.5