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)
17 set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
18 set(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
19 FILE(STRINGS "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
22 set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
26 set(CPACK_SET_DESTDIR "ON")
27 FILE(READ "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_license.txt" CPACK_RPM_PACKAGE_LICENSE)
28 set(CPACK_RPM_PACKAGE_GROUP "Applications/Publishing")
29 set(CPACK_RPM_PACKAGE_VENDOR "The LyX team")
31 # the next ones are needed by deb
32 set(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
33 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${LYX_PROJECT}-${LYX_INSTALL_SUFFIX}")
35 # We depend on python scripting
36 set(CPACK_DEBIAN_PACKAGE_DEPENDS "python (>= 2.6)")
38 # use dpkg-shlibdeps to generate additional info for package dependency list.
39 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
42 # for the next ones, cpack insists on data with values in some file
43 set(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_description.txt")
44 set(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_license.txt")
46 # Use the revision number saved in ${LYX_PACKAGE_RELEASE}
47 # as the release in rpm-package-build.
48 # This way we maycan omit the otherwise needed "--force" parameter when
49 # installing from that rpm package.
50 set(CPACK_RPM_PACKAGE_RELEASE ${LYX_PACKAGE_RELEASE})
51 set(CPACK_PACKAGE_VERSION_PATCH ${LYX_REVISION_VERSION})
53 # we do not have a readme or welcome data,
54 # so we do not provide infofiles for
55 # CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
58 set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
61 set(CPACK_STRIP_FILES 1)
63 # Finaly give some hints about files not to be included in source package
64 SET(CPACK_SOURCE_IGNORE_FILES
79 "/CPackSourceConfig\\\\.cmake$"
80 "/configCompiler\\\\.h$"
81 "/install_manifest\\\\.txt$"
82 "/cmake_install\\\\.cmake$"
95 "/autom4te\\\\.cache/"
106 #Now it is possible to create some packages
109 #############################################################################################
110 # So, e.g. for variables
111 # CMAKE_PROJECT_NAME : lyx
112 # CPACK_PACKAGE_VERSION_MAJOR : 2
113 # CPACK_PACKAGE_VERSION_MINOR : 0
114 # CPACK_PACKAGE_VERSION_PATCH : 1
115 # CMAKE_SYSTEM_NAME : Linux
116 # CPACK_BINARY_DEB:BOOL : ON
118 # the package name builds as "lyx-2.0.1-Linux.deb"
120 ############################## rpm ################################### deb ##################
121 # create # cpack -G RPM --config CPackConfig.cmake # cpack -G DEB --config CPackConfig.cmake
122 # creates =># lyx-2.0.1-Linux.rpm # lyx-2.0.1-Linux.deb
123 # list # rpm -qlp lyx-2.0.1-Linux.rpm # dpkg-deb -c lyx-2.0.1-Linux.deb
124 # install # rpm -U lyx-2.0.1-Linux.rpm # dpkg -i lyx-2.0.1-Linux.deb