Commits

Vincent Rabeux  committed 042e5d1

Deb packaging for the framework and Lipsum4Qt.

  • Participants
  • Parent commits 15430a7

Comments (0)

Files changed (4)

File documentImageCreator/src/framework/CMakeLists.txt

 
 cmake_minimum_required(VERSION 2.6)
 
-PROJECT(DocumentCreator)
+
+project(DocumentCreator)
+
+set(DocumentCreator_DESCRIPTION "This framework contains utility classes to create synthetic documents. Developped for the ANR-Digidoc project")
+
+set(DocumentCreator_AUTHOR "Vincent Rabeux <rabeux@labri.fr>")
+set(DocumentCreator_VENDOR "labri")
+
+set(DocumentCreator_MAJOR_VERSION 0)
+set(DocumentCreator_MINOR_VERSION 1)
+set(DocumentCreator_PATCH_VERSION 0)
+
 
 include_directories(.)
 
 SET(outFiles)
 
 # Find all the input files
-
-
 FOREACH(infileName ${DocumentCreator_headers})
     SET(outFiles ${outFiles} "${infileName}")
 ENDFOREACH(infileName)
 
 
 
-
 INSTALL(FILES ${headers_global} DESTINATION include/DocumentCreator)
-
-
-
 INSTALL(FILES ${headers_context} DESTINATION include/DocumentCreator/context)
-
-
 INSTALL(FILES ${headers_core} DESTINATION include/DocumentCreator/core)
-
-
-
-
 INSTALL(FILES ${headers_iomanager} DESTINATION include/DocumentCreator/iomanager)
-
-
 INSTALL(FILES ${headers_models} DESTINATION include/DocumentCreator/models)
-
-
-
 INSTALL(FILES ${headers_models_doc} DESTINATION include/DocumentCreator/models/doc)
-
-
-
 INSTALL(FILES ${headers_mvc} DESTINATION include/DocumentCreator/mvc)
-
-
-
 INSTALL(FILES ${headers_patterns} DESTINATION include/DocumentCreator/patterns)
-
 INSTALL(TARGETS DocumentCreator
         #FRAMEWORK DESTINATION /Library/Frameworks
         RUNTIME DESTINATION bin
 )
 
 INSTALL(FILES DocumentCreator.pc DESTINATION lib/pkgconfig)
+
+
+
+########################################################################################
+# CPACK
+################
+
+set(CPACK_PACKAGE_NAME DocumentCreator)
+
+set(CPACK_PACKAGE_VENDOR ${DocumentCreator_VENDOR})
+set(DocumentCreator_VERSION ${DocumentCreator_MAJOR_VERSION}.${DocumentCreator_MINOR_VERSION}.${DocumentCreator_PATCH_VERSION})
+SET(CPACK_PACKAGE_VERSION "${DocumentCreator_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${DocumentCreator_MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${DocumentCreator_MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${DocumentCreator_PATCH_VERSION}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY DocumentCreator)
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${DocumentCreator_DESCRIPTION})
+
+IF(UNIX AND NOT APPLE)
+        SET(CPACK_GENERATOR "DEB")
+        SET(CPACK_DEBIAN_PACKAGE_NAME "libdocumentcreator-dev")
+        SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${DocumentCreator_AUTHOR})
+        SET(CPACK_PACKAGE_CONTACT "digidoc@gmail.com")
+        Set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
+        SET(DEB_DEPENDENCIES "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12), libqt4-core (>=4.8.0), libqt4-gui (>=4.8.0), libopencv-dev")
+        IF(NOT DEFINED DocumentCreator_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES}")
+        ENDIF(NOT DEFINED DocumentCreator_DEB_DEPENDS)
+        IF(DEFINED DocumentCreator_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES},${DocumentCreator_DEB_DEPENDS}")
+        ENDIF(DEFINED DocumentCreator_DEB_DEPENDS)
+
+        SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
+ENDIF(UNIX AND NOT APPLE)
+
+INCLUDE(CPack)
+

File documentImageCreator/src/gui/AncientDocumentEditor/CMakeLists.txt

 
 PROJECT(AncientDocumentEditor)
 SET( CMAKE_COLOR_MAKEFILE ON )
-SET( CMAKE_VERBOSE_MAKEFILE ON )
+#SET( CMAKE_VERBOSE_MAKEFILE ON )
 
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
 FIND_LIBRARY(Lipsum4Qt_LIBRARIES Lipsum4Qt)
 
-message(${Lipsum4Qt_LIBRARIES})
-
 FIND_LIBRARY(DocumentCreator_LIBRARIES DocumentCreator REQUIRED)
 include_directories(/usr/local/include/DocumentCreator REQUIRED)
 
 RUNTIME DESTINATION bin COMPONENT Runtime
 )
 
+IF(APPLE)
 #--------------------------------------------------------------------------------
 # On copie le dossier de plugins QT dans le bundle courant
-
 INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime)
 
 
 
 #--------------------------------------------------------------------------------
 # On copie le qt_menu.nib de QT dans le bundle courant
-IF(APPLE)
 install (DIRECTORY ${QT_LIBRARY_DIR}/QtGui.framework/Resources/qt_menu.nib DESTINATION ${NAME}.app/Contents/Resources)
 #--------------------------------------------------------------------------------
 # Grace a BundleUtilities on peux copier les libs nécessaire dans la partie

File libs/Lipsum4Qt/CMakeLists.txt

 
 cmake_minimum_required(VERSION 2.6)
 
-PROJECT(Lipsum4Qt)
+project(Lipsum4Qt)
+
+set(Lipsum4Qt_DESCRIPTION "This framework contains utility classes to use the random text generator http://www.lipsum.com/ from C++ . Developped for the ANR-Digidoc project")
+
+set(Lipsum4Qt_AUTHOR "Vincent Rabeux <rabeux@labri.fr>")
+set(Lipsum4Qt_VENDOR "labri")
+
+set(Lipsum4Qt_MAJOR_VERSION 0)
+set(Lipsum4Qt_MINOR_VERSION 1)
+set(Lipsum4Qt_PATCH_VERSION 0)
+
+
 SET( LIB_NAME Lipsum4Qt )
 
 include_directories(./src)
 
 
 
-#INSTALL(FILES ${Lipsum4Qt_headers} DESTINATION include/${LIB_NAME})
+INSTALL(FILES ${Lipsum4Qt_headers} DESTINATION include/Lipsum4Qt)
 
 
 INSTALL(TARGETS ${LIB_NAME}
     #    RESOURCE DESTINATION share/foo-${foo_ver}/Resources
 )
 
-#INSTALL(FILES ${LIB_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES Lipsum4Qt.pc DESTINATION lib/pkgconfig)
+
+
+########################################################################################
+# CPACK
+################
+
+set(CPACK_PACKAGE_NAME Lipsum4Qt)
+
+set(CPACK_PACKAGE_VENDOR ${Lipsum4Qt_VENDOR})
+set(Lipsum4Qt_VERSION ${Lipsum4Qt_MAJOR_VERSION}.${Lipsum4Qt_MINOR_VERSION}.${Lipsum4Qt_PATCH_VERSION})
+SET(CPACK_PACKAGE_VERSION "${Lipsum4Qt_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${Lipsum4Qt_MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${Lipsum4Qt_MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${Lipsum4Qt_PATCH_VERSION}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY Lipsum4Qt)
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${Lipsum4Qt_DESCRIPTION})
+
+IF(UNIX AND NOT APPLE)
+        SET(CPACK_GENERATOR "DEB")
+        SET(CPACK_DEBIAN_PACKAGE_NAME "liblipsum4qt-dev")
+        SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${Lipsum4Qt_AUTHOR})
+        SET(CPACK_PACKAGE_CONTACT "digidoc@gmail.com")
+        Set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
+        SET(DEB_DEPENDENCIES "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12), libqt4-core (>=4.8.0), libqt4-gui (>=4.8.0)")
+        IF(NOT DEFINED Lipsum4Qt_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES}")
+        ENDIF(NOT DEFINED Lipsum4Qt_DEB_DEPENDS)
+        IF(DEFINED Lipsum4Qt_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES},${Lipsum4Qt_DEB_DEPENDS}")
+        ENDIF(DEFINED Lipsum4Qt_DEB_DEPENDS)
+
+        SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
+ENDIF(UNIX AND NOT APPLE)
+
+INCLUDE(CPack)
+
+

File libs/Lipsum4Qt/src/Lipsum4Qt.cpp

 {
     return _repliedLipsum;
 }
+