[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Tue Jan 18 13:33:01 CET 2011
SVN commit 1215364 by kuemmel:
cmake: add packaging rules for .zip, .tar.gz, .sh, .deb, .rpm
M +22 -2 INSTALL
M +64 -1 cmake/CMakeLists.txt
--- branches/work/kst/portto4/kst/INSTALL #1215363:1215364
@@ -137,6 +137,27 @@
+Packaging
+----------
+
+ - Source .targz, .tar.bz2, .zip:
+ make package_source
+
+ - Binary .tar.gz and install .sh:
+ make package
+
+ - Binary .deb:
+ create : cpack -G DEB --config CPackConfig.cmake
+ list : dpkg-deb -c Kst-*.deb
+ install: dpkg -i Kst-*.deb
+
+ - Binary .rpm:
+ create : cpack -G RPM --config CPackConfig.cmake
+ list : rpm -qlp Kst-*.rpm
+ install: rpm -U Kst-*.rpm
+
+
+
Status
-----------
@@ -144,8 +165,7 @@
Windows, and MacOSX.
Nice to have:
- - add package rules: it is possiible to generate
- .deb, .rpm, .zip, nsis-Installer, mac-bundles
+ - add more package rules: nsis, mac-bundles
- installation rules on Mac
- add pre-compiled headers for Mac, Xcode
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1215363:1215364
@@ -7,7 +7,10 @@
get_filename_component(kst_dir ${CMAKE_SOURCE_DIR}/.. ABSOLUTE)
-set(kst_version 2.0.3)
+set(kst_version_major 2)
+set(kst_version_minor 0)
+set(kst_version_patch 3)
+set(kst_version ${kst_version_major}.${kst_version_minor}.${kst_version_patch})
include(SubversionHeader)
kst_revision_project_name(Revision)
@@ -146,3 +149,63 @@
+
+# CPack packaging
+#
+# http://cmake.org/cmake/help/cmake-2-8-docs.html#module:CPack
+
+set(CPACK_PACKAGE_NAME Kst)
+set(CPACK_PACKAGE_VENDOR "The Kst Team")
+set(CPACK_PACKAGE_VERSION_MAJOR ${kst_version_major})
+set(CPACK_PACKAGE_VERSION_MINOR ${kst_version_minor})
+set(CPACK_PACKAGE_VERSION_PATCH ${kst_version_patch})
+
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Kst 2")
+set(CPACK_PACKAGE_DESCRIPTION_FILE ${kst_dir}/README)
+set(CPACK_PACKAGE_CONTACT "http://bugs.kde.org}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "Kst ${kst_version}")
+
+set(CPACK_RESOURCE_FILE_LICENSE ${kst_dir}/COPYING)
+
+
+# sources
+set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${kst_dir};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
+set(CPACK_SOURCE_PACKAGE_FILE_NAME Kst-${kst_version})
+set(CPACK_SOURCE_GENERATOR TGZ ZIP TBZ2)
+
+# rpm
+set(CPACK_SET_DESTDIR "ON")
+FILE(READ ${CPACK_RESOURCE_FILE_LICENSE} CPACK_RPM_PACKAGE_LICENSE)
+set(CPACK_RPM_PACKAGE_GROUP "Applications/Science")
+set(CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR})
+
+# deb
+# This is experimental
+# check also for plugin's 3rdparty libraries?
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtgui4 (>= 4.4.3-0)")
+
+
+include(CPack)
+
+# Usage
+#
+# Source only .targz, .tar.bz2, .zip:
+# make package_source
+#
+# Binary .tar.gz and install .sh:
+# make package
+#
+# Binary .deb:
+# create : cpack -G DEB --config CPackConfig.cmake
+# list : dpkg-deb -c Kst-*.deb
+# install: dpkg -i Kst-*.deb
+#
+# Binary .rpm:
+# create : cpack -G RPM --config CPackConfig.cmake
+# list : rpm -qlp Kst-*.rpm
+# install: rpm -U Kst-*.rpm
+
+
+# CPack and Ubuntu
+# Found this:
+# http://www.purplekarrot.net/blog/dputCMake.html
More information about the Kst
mailing list