Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 346)
+++ CMakeLists.txt	(working copy)
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 2.6.3)
-PROJECT(all)
+PROJECT(crtmpserver)
 
 SET(CRTMPSERVER_ROOT "lib/crtmpserver")
 
@@ -158,3 +158,37 @@
 ADD_SUBDIRECTORY(vmtests vmtests)
 ADD_SUBDIRECTORY(tests)
 
+
+SET(MAJOR_VERSION 0)
+EXECUTE_PROCESS(COMMAND svnversion -n ../../sources OUTPUT_VARIABLE MINOR_VERSION)
+#SET(MINOR_VERSION 0)
+SET(PATCH_VERSION 0)
+
+IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+INCLUDE(InstallRequiredSystemLibraries)
+
+SET(CPACK_SET_DESTDIR "on")
+SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
+SET(CPACK_GENERATOR "DEB")
+
+SET(CPACK_PACKAGE_DESCRIPTION "High performance RTMP/RTSP streaming server")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High performance RTMP/RTSP streaming server")
+SET(CPACK_PACKAGE_VENDOR "EVOSTREAM")
+SET(CPACK_PACKAGE_CONTACT "crtmpserver@gmail.com")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
+SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
+SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
+
+#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "kdebase-runtime (>= 4:4.2.1), kdelibs5 (>= 4:4.2.1), libc6 (>= 2.1.3), libgcc1 (>= 1:4.1.1), libplasma3, libqt4-dbus (>= 4.5.0), libqtcore4 (>= 4.5.0), libqtgui4 (>= 4.5.0), libstdc++6 (>= 4.2.1)")
+
+SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+SET(CPACK_DEBIAN_PACKAGE_SECTION "kde")
+SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
+
+SET(CPACK_COMPONENTS_ALL Libraries ApplicationData)
+INCLUDE(CPack)
+
+ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+
