[vlmc-devel] CMake: Add and update CPack rules for DEB/RPM

Rohit Yadav git at videolan.org
Tue Sep 13 05:15:16 CEST 2011


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Tue Sep 13 09:02:22 2011 +0530| [eb60df9be324c4f9b5b131a97fbf36a5ece6cffe] | committer: Rohit Yadav

CMake: Add and update CPack rules for DEB/RPM

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=eb60df9be324c4f9b5b131a97fbf36a5ece6cffe
---

 CMakeLists.txt |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8dbeb0..6d83dc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -273,31 +273,42 @@ SET(PACKAGE_REQUIRES "libvlc-dev ( >= 1.1.4 ), frei0r-plugins, libqt4-gui ( >= 4
 INCLUDE ( ${CMAKE_MODULE_PATH}/RpmBuild.cmake )
 IF ( RPMBUILD_FOUND AND NOT WIN32 )
     SET(CPACK_GENERATOR "RPM")
+    SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+    SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
+    SET(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION})
+    SET(CPACK_RPM_PACKAGE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
+    SET(CPACK_RPM_PACKAGE_GROUP ${PROJECT_VENDOR})
+    SET(CPACK_RPM_PACKAGE_VENDOR ${PROJECT_VENDOR})
+    SET(CPACK_RPM_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})
+    SET(CPACK_RPM_PACKAGE_ARCHITECTURE i386) # Change to your architecture here
+    SET(CPACK_RPM_PACKAGE_DEPENDS "qt ( >= 4.6 ), qt-x11 ( >= 4.6 )") # Specify dependencies here
     SET(CPACK_SET_DESTDIR TRUE)
-    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
 ENDIF ( RPMBUILD_FOUND AND NOT WIN32 )
 
 # Debian packages
 INCLUDE ( ${CMAKE_MODULE_PATH}/DpkgBuild.cmake )
 IF ( DPKG_FOUND AND NOT WIN32 )
     SET(CPACK_GENERATOR "DEB")
-    SET(CPACK_SET_DESTDIR TRUE)
+    SET(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
+    SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
+    SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+    SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <${CPACK_PACKAGE_CONTACT}>")
+    SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+    SET(CPACK_DEBIAN_PACKAGE_DEBUG ON)
     SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${PACKAGE_REQUIRES})
+    SET(CPACK_SET_DESTDIR TRUE)
 ENDIF ( DPKG_FOUND AND NOT WIN32 )
 
 # Mac Bundle
 IF( APPLE )
     SET(CPACK_GENERATOR "DragNDrop")
-
     #Libraries are bundled directly
     SET(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
-
     # Bundle Properties
     SET(MACOSX_BUNDLE_BUNDLE_NAME VLMC)
     SET(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
     SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
     SET(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}")
-
     #SET(CPACK_STRIP_FILES TRUE)
 ENDIF( APPLE )
 



More information about the Vlmc-devel mailing list