4 # http://cmake.org/cmake/help/cmake-2-8-docs.html#module:CPack
8 set(CPACK_GENERATOR DragNDrop)
10 set(CPACK_GENERATOR STGZ)
12 set(CPACK_GENERATOR ZIP)
16 # Overwrite package name dependent on platform
17 # (Ignores the top project)
19 # true on all systems whre __APPLE__ is defined in header files
20 set(CPACK_PACKAGE_NAME LyX)
22 # True also for cygwin
23 set(CPACK_PACKAGE_NAME lyx)
25 set(CPACK_PACKAGE_NAME LyX)
28 set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
29 set(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
30 FILE(STRINGS "${TOP_CMAKE_PATH}/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
33 set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
37 set(CPACK_SET_DESTDIR "ON")
38 FILE(READ "${TOP_CMAKE_PATH}/LyX_license.txt" CPACK_RPM_PACKAGE_LICENSE)
39 set(CPACK_RPM_PACKAGE_GROUP "Applications/Publishing")
40 set(CPACK_RPM_PACKAGE_VENDOR "The LyX team")
42 # the next ones are needed by deb
43 set(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
44 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${LYX_PROJECT}-${LYX_INSTALL_SUFFIX}")
46 # We depend on python scripting
47 set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.6)")
49 # use dpkg-shlibdeps to generate additional info for package dependency list.
50 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
53 # for the next ones, cpack insists on data with values in some file
54 set(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_CMAKE_PATH}/LyX_description.txt")
55 set(CPACK_RESOURCE_FILE_LICENSE "${TOP_CMAKE_PATH}/LyX_license.txt")
57 # Use the revision number saved in ${LYX_PACKAGE_RELEASE}
58 # as the release in rpm-package-build.
59 # This way we maycan omit the otherwise needed "--force" parameter when
60 # installing from that rpm package.
61 set(CPACK_RPM_PACKAGE_RELEASE ${LYX_PACKAGE_RELEASE})
62 set(CPACK_PACKAGE_VERSION_PATCH ${LYX_REVISION_VERSION})
64 # we do not have a readme or welcome data,
65 # so we do not provide infofiles for
66 # CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
69 set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
72 set(CPACK_STRIP_FILES 1)
74 # Finaly give some hints about files not to be included in source package
75 SET(CPACK_SOURCE_IGNORE_FILES
90 "/CPackSourceConfig\\\\.cmake$"
91 "/configCompiler\\\\.h$"
92 "/install_manifest\\\\.txt$"
93 "/cmake_install\\\\.cmake$"
106 "/autom4te\\\\.cache/"
117 #Now it is possible to create some packages
120 #############################################################################################
121 # So, e.g. for variables
122 # CMAKE_PROJECT_NAME : lyx
123 # CPACK_PACKAGE_VERSION_MAJOR : 2
124 # CPACK_PACKAGE_VERSION_MINOR : 0
125 # CPACK_PACKAGE_VERSION_PATCH : 1
126 # CMAKE_SYSTEM_NAME : Linux
127 # CPACK_BINARY_DEB:BOOL : ON
129 # the package name builds as "lyx-2.0.1-Linux.deb"
131 ############################## rpm ################################### deb ##################
132 # create # cpack -G RPM --config CPackConfig.cmake # cpack -G DEB --config CPackConfig.cmake
133 # creates =># lyx-2.0.1-Linux.rpm # lyx-2.0.1-Linux.deb
134 # list # rpm -qlp lyx-2.0.1-Linux.rpm # dpkg-deb -c lyx-2.0.1-Linux.deb
135 # install # rpm -U lyx-2.0.1-Linux.rpm # dpkg -i lyx-2.0.1-Linux.deb