diff options
Diffstat (limited to 'CMakeScripts')
| -rw-r--r-- | CMakeScripts/ConfigCPack.cmake | 178 | ||||
| -rw-r--r-- | CMakeScripts/ConfigPaths.cmake | 5 | ||||
| -rw-r--r-- | CMakeScripts/Pod2man.cmake | 40 |
3 files changed, 206 insertions, 17 deletions
diff --git a/CMakeScripts/ConfigCPack.cmake b/CMakeScripts/ConfigCPack.cmake index 175816d52..29d34a007 100644 --- a/CMakeScripts/ConfigCPack.cmake +++ b/CMakeScripts/ConfigCPack.cmake @@ -6,22 +6,28 @@ ## General ## set(CPACK_PACKAGE_NAME "Inkscape") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Inkscape, open-source vector graphics editor") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open-source vector graphics editor") set(CPACK_PACKAGE_VENDOR "Inkscape") set(CPACK_PACKAGE_CONTACT "Inkscape developers <inkscape-devel@lists.sourceforge.net>") -set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSES/GPL-3.0.txt") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://inkscape.org") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSES/GPL-3.0.txt") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") set(CPACK_PACKAGE_VERSION_MAJOR ${INKSCAPE_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${INKSCAPE_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${INKSCAPE_VERSION_PATCH}) +set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/branding/inkscape.ico") -set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${INKSCAPE_VERSION_SUFFIX}") +set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}~${INKSCAPE_VERSION_SUFFIX}") set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;/obj*/;tags;cscope.*") set(INKSCAPE_CPACK_PREFIX ${PROJECT_NAME}-${INKSCAPE_VERSION}_${INKSCAPE_REVISION_DATE}_${INKSCAPE_REVISION_HASH}) set(CPACK_SOURCE_PACKAGE_FILE_NAME ${INKSCAPE_CPACK_PREFIX}) set(CPACK_PACKAGE_FILE_NAME ${INKSCAPE_CPACK_PREFIX}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "inkscape") set(CPACK_SOURCE_GENERATOR "TXZ") +set(CPACK_PACKAGE_EXECUTABLES "inkscape;Inkscape;inkview;Inkview") +set(CPACK_STRIP_FILES TRUE) +set(CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION TRUE) ## Windows ## @@ -45,8 +51,8 @@ if(UNIX) IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) FIND_PROGRAM(DPKG_CMD dpkg) IF(NOT DPKG_CMD) - MESSAGE(STATUS "Can not find dpkg in your path, default to i386.") - SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) + MESSAGE(STATUS "Can not find dpkg in your path, default to amd64.") + SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64) ENDIF(NOT DPKG_CMD) EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE @@ -56,6 +62,7 @@ if(UNIX) SET(CPACK_DEBIAN_PACKAGE_SECTION "graphics") SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "aspell, imagemagick, libwmf-bin, perlmagick, python-numpy, python-lxml, python-scour, python-uniconvertor") SET(CPACK_DEBIAN_PACKAGE_SUGGESTS "dia, libsvg-perl, libxml-xql-perl, pstoedit, python-uniconvertor, ruby") + install(FILES ${CMAKE_SOURCE_DIR}/COPYING RENAME copyright DESTINATION ${SHARE_INSTALL}/doc/inkscape/) endif(UNIX) ### RPM ### @@ -63,5 +70,164 @@ endif(UNIX) ## MacOS ## +#[[ +.. variable:: CPACK_DMG_VOLUME_NAME + + The volume name of the generated disk image. Defaults to + CPACK_PACKAGE_FILE_NAME. + +.. variable:: CPACK_DMG_FORMAT + + The disk image format. Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF + zlib-compressed) or ``UDBZ`` (UDIF bzip2-compressed). Refer to ``hdiutil(1)`` for + more information on other available formats. Defaults to ``UDZO``. + +.. variable:: CPACK_DMG_DS_STORE + + Path to a custom ``.DS_Store`` file. This ``.DS_Store`` file can be used to + specify the Finder window position/geometry and layout (such as hidden + toolbars, placement of the icons etc.). This file has to be generated by + the Finder (either manually or through AppleScript) using a normal folder + from which the ``.DS_Store`` file can then be extracted. + +.. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT + + Path to a custom AppleScript file. This AppleScript is used to generate + a ``.DS_Store`` file which specifies the Finder window position/geometry and + layout (such as hidden toolbars, placement of the icons etc.). + By specifying a custom AppleScript there is no need to use + ``CPACK_DMG_DS_STORE``, as the ``.DS_Store`` that is generated by the AppleScript + will be packaged. + +.. variable:: CPACK_DMG_BACKGROUND_IMAGE + + Path to an image file to be used as the background. This file will be + copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file + extension. The background image is installed into the image before + ``CPACK_DMG_DS_STORE_SETUP_SCRIPT`` is executed or ``CPACK_DMG_DS_STORE`` is + installed. By default no background image is set. + +.. variable:: CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK + + Default behaviour is to include a symlink to ``/Applications`` in the DMG. + Set this option to ``ON`` to avoid adding the symlink. + +.. variable:: CPACK_DMG_SLA_DIR + + Directory where license and menu files for different languages are stored. + Setting this causes CPack to look for a ``<language>.menu.txt`` and + ``<language>.license.txt`` file for every language defined in + ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and + ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu + files and use the same license file for all languages. + +.. variable:: CPACK_DMG_SLA_LANGUAGES + + Languages for which a license agreement is provided when mounting the + generated DMG. A menu file consists of 9 lines of text. The first line is + is the name of the language itself, uppercase, in English (e.g. German). + The other lines are translations of the following strings: + + - Agree + - Disagree + - Print + - Save... + - You agree to the terms of the License Agreement when you click the + "Agree" button. + - Software License Agreement + - This text cannot be saved. The disk may be full or locked, or the file + may be locked. + - Unable to print. Make sure you have selected a printer. + + For every language in this list, CPack will try to find files + ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory + specified by the ``CPACK_DMG_SLA_DIR`` variable. + +.. variable:: CPACK_COMMAND_HDIUTIL + + Path to the ``hdiutil(1)`` command used to operate on disk image files on + macOS. This variable can be used to override the automatically detected + command (or specify its location if the auto-detection fails to find it). + +.. variable:: CPACK_COMMAND_SETFILE + + Path to the ``SetFile(1)`` command used to set extended attributes on files and + directories on macOS. This variable can be used to override the + automatically detected command (or specify its location if the + auto-detection fails to find it). + + .. variable:: CPACK_COMMAND_REZ + + Path to the ``Rez(1)`` command used to compile resources on macOS. This + variable can be used to override the automatically detected command (or + specify its location if the auto-detection fails to find it). + + + +#Variables specific to CPack Bundle generator +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Installers built on macOS using the Bundle generator use the +aforementioned DragNDrop (``CPACK_DMG_xxx``) variables, plus the following +Bundle-specific parameters (``CPACK_BUNDLE_xxx``). + +.. variable:: CPACK_BUNDLE_NAME + + The name of the generated bundle. This appears in the OSX finder as the + bundle name. Required. + +.. variable:: CPACK_BUNDLE_PLIST + + Path to an OSX plist file that will be used for the generated bundle. This + assumes that the caller has generated or specified their own Info.plist + file. Required. + +.. variable:: CPACK_BUNDLE_ICON + + Path to an OSX icon file that will be used as the icon for the generated + bundle. This is the icon that appears in the OSX finder for the bundle, and + in the OSX dock when the bundle is opened. Required. + +.. variable:: CPACK_BUNDLE_STARTUP_COMMAND + + Path to a startup script. This is a path to an executable or script that + will be run whenever an end-user double-clicks the generated bundle in the + OSX Finder. Optional. + +.. variable:: CPACK_BUNDLE_APPLE_CERT_APP + + The name of your Apple supplied code signing certificate for the application. + The name usually takes the form ``Developer ID Application: [Name]`` or + ``3rd Party Mac Developer Application: [Name]``. If this variable is not set + the application will not be signed. + +.. variable:: CPACK_BUNDLE_APPLE_ENTITLEMENTS + + The name of the ``Plist`` file that contains your apple entitlements for sandboxing + your application. This file is required for submission to the Mac App Store. + + .. variable:: CPACK_BUNDLE_APPLE_CODESIGN_FILES + + A list of additional files that you wish to be signed. You do not need to + list the main application folder, or the main executable. You should + list any frameworks and plugins that are included in your app bundle. + +.. variable:: CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER + + Additional parameter that will passed to ``codesign``. + Default value: ``--deep -f`` + +.. variable:: CPACK_COMMAND_CODESIGN + + Path to the ``codesign(1)`` command used to sign applications with an + Apple cert. This variable can be used to override the automatically + detected command (or specify its location if the auto-detection fails + to find it). + + + + See also : PackageMaker + + #]] include(CPack) diff --git a/CMakeScripts/ConfigPaths.cmake b/CMakeScripts/ConfigPaths.cmake index dd45ccf1c..46b48cb75 100644 --- a/CMakeScripts/ConfigPaths.cmake +++ b/CMakeScripts/ConfigPaths.cmake @@ -17,9 +17,8 @@ if(WIN32) else() set(INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share") - # TODO: check and change this to correct value: if(NOT PACKAGE_LOCALE_DIR) - set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this + set(PACKAGE_LOCALE_DIR "share/locale") # packagers might overwrite this endif(NOT PACKAGE_LOCALE_DIR) if(NOT SHARE_INSTALL) @@ -28,4 +27,4 @@ else() set(INKSCAPE_SHARE_INSTALL "${SHARE_INSTALL}/inkscape") mark_as_advanced(SHARE_INSTALL) -endif()
\ No newline at end of file +endif() diff --git a/CMakeScripts/Pod2man.cmake b/CMakeScripts/Pod2man.cmake index 5b6afa914..42b4f4100 100644 --- a/CMakeScripts/Pod2man.cmake +++ b/CMakeScripts/Pod2man.cmake @@ -9,6 +9,11 @@ if(NOT POD2MAN) message(STATUS "Could not find pod2man - man pages disabled") endif() +find_program(GZIP gzip) +if(NOT GZIP) + message(STATUS "Could not find gzip - man pages uncompressed") +endif() + macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) get_filename_component(PODFILE ${PODFILE_FULL} NAME) string(REPLACE "." ";" PODFILE_LIST ${PODFILE}) @@ -28,11 +33,13 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) set(MANPAGE_TARGET "man-${NAME}-${LANG}") set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.tmp") set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.${SECTION}") + set(MANFILE_FULL_GZ "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${LANG}.${SECTION}.gz") set(MANFILE_DEST "${SHARE_INSTALL}/man/${LANG}/man${SECTION}") else() set(MANPAGE_TARGET "man-${NAME}") set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.tmp") set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION}") + set(MANFILE_FULL_GZ "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION}.gz") set(MANFILE_DEST "${SHARE_INSTALL}/man/man${SECTION}") endif() add_custom_command( @@ -40,18 +47,35 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) COMMAND ${POD2MAN} --utf8 --section="${SECTION}" --center="${CENTER}" --release="${RELEASE}" --name="${NAME_UPCASE}" "${PODFILE_FULL}" "${MANFILE_TEMP}" ) + add_custom_command( OUTPUT ${MANFILE_FULL} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/fix-roff-punct "${MANFILE_TEMP}" > ${MANFILE_FULL} DEPENDS ${MANFILE_TEMP} ) - add_custom_target(${MANPAGE_TARGET} ALL - DEPENDS ${MANFILE_FULL} - ) - install( - FILES ${MANFILE_FULL} - RENAME ${NAME}.${SECTION} - DESTINATION ${MANFILE_DEST} - ) + if(GZIP) + add_custom_command( + OUTPUT ${MANFILE_FULL_GZ} + COMMAND ${GZIP} -k --best -n "${MANFILE_FULL}" + DEPENDS ${MANFILE_FULL} + ) + add_custom_target(${MANPAGE_TARGET} ALL + DEPENDS ${MANFILE_FULL_GZ} + ) + install( + FILES ${MANFILE_FULL_GZ} + RENAME ${NAME}.${SECTION}.gz + DESTINATION ${MANFILE_DEST} + ) + else(GZIP) + add_custom_target(${MANPAGE_TARGET} ALL + DEPENDS ${MANFILE_FULL} + ) + install( + FILES ${MANFILE_FULL} + RENAME ${NAME}.${SECTION} + DESTINATION ${MANFILE_DEST} + ) + endif() endif() endmacro(pod2man PODFILE NAME SECTION CENTER) |
