summaryrefslogtreecommitdiffstats
path: root/Modules/CPackDeb.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-27 12:59:59 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-27 12:59:59 (GMT)
commitd6a0c330bc2087eb5007d4b6b056e573220dc590 (patch)
tree1413695a25b3348b79d3541c22029fb7b80bc3a3 /Modules/CPackDeb.cmake
parente2aeecc29440b906fad3d8964b169b62cdfef188 (diff)
downloadCMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.zip
CMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.tar.gz
CMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.tar.bz2
ENH: deb generator can now generate deb packages
-remove the unscriptable commands also from the cpack cmake -use CPACK_PACKAGE_CONTACT in CMakeCPack.cmake, it's used in the nsis and the deb generator -make set_properties() scriptable -use a non-const char array for adding the python modules Alex
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r--Modules/CPackDeb.cmake50
1 files changed, 50 insertions, 0 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index e4c123b..4b782c8 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -8,3 +8,53 @@ ENDIF(NOT UNIX)
FIND_PROGRAM(AR_EXECUTABLE ar)
+IF(NOT AR_EXECUTABLE)
+ # Is there a *NIX out there without ar ?
+ MESSAGE(FATAL_ERROR "debian package require a ar executable")
+ENDIF(NOT AR_EXECUTABLE)
+
+# Let's define the control file found in debian package:
+
+# Package:
+# debian policy enforce lower case for package name
+IF(NOT DEBIAN_PACKAGE_NAME)
+ STRING(TOLOWER ${CPACK_PACKAGE_NAME} DEBIAN_PACKAGE_NAME)
+ENDIF(NOT DEBIAN_PACKAGE_NAME)
+
+# Version:
+IF(NOT DEBIAN_PACKAGE_VERSION)
+ IF(NOT CPACK_PACKAGE_VERSION)
+ MESSAGE(FATAL_ERROR "debian package require a package version")
+ ENDIF(NOT CPACK_PACKAGE_VERSION)
+ SET(DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
+ENDIF(NOT DEBIAN_PACKAGE_VERSION)
+
+# Architecture:
+IF(NOT DEBIAN_PACKAGE_ARCHITECTURE)
+# There is no such thing as i686 architecture on debian, you should use i386 instead
+# $ dpkg --print-architecture
+ SET(DEBIAN_PACKAGE_ARCHITECTURE i386)
+ENDIF(NOT DEBIAN_PACAKGE_ARCHITECTURE)
+
+# Depends:
+IF(NOT DEBIAN_PACKAGE_DEPENDS)
+ SET(DEBIAN_PACKAGE_DEPENDS
+ "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)"
+ )
+ENDIF(NOT DEBIAN_PACKAGE_DEPENDS)
+
+# Maintainer:
+IF(NOT DEBIAN_PACKAGE_MAINTAINER)
+ IF(NOT CPACK_PACKAGE_CONTACT)
+ MESSAGE(FATAL_ERROR "debian package require a maintainer for a package")
+ ENDIF(NOT CPACK_PACKAGE_CONTACT)
+ SET(DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
+ENDIF(NOT DEBIAN_PACKAGE_MAINTAINER)
+
+# Description:
+IF(NOT DEBIAN_PACKAGE_DESCRIPTION)
+ IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ MESSAGE(FATAL_ERROR "debian package require a summary for a package")
+ ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ SET(DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ENDIF(NOT DEBIAN_PACKAGE_DESCRIPTION)