title: How to build a "file copy" RPM using cmake?
body: <p>I want to build a demo rpm package which copies one file to the target system and executes some pre and post script.
  I managed to create a package. When I run the package on the target system I got the e warning "warning: package xxx intend for yyy plattform". But no file was copied.
  Any ideas?
  After goes my code/project:</p>
  
  <p>Project tree:</p>
  
  <pre><code>myRpm/CMakeLists.txt
  myRpm/install.txt
  myRpm/post.py
  myRpm/post.sh
  myRpm/pre.py
  myRpm/pre.sh
  </code></pre>
  
  <p>CMakeLists:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.8)
  if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
      INCLUDE(InstallRequiredSystemLibraries)
      set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
      set(CPACK_PACKAGE_NAME "my test")
      set(CPACK_PACKAGE_VENDOR "tets")
      set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "fake rpm")
      set(CPACK_PACKAGE_VERSION "6.6.6")
      set(CPACK_PACKAGE_VERSION_MAJOR "6")
      set(CPACK_PACKAGE_VERSION_MINOR "6")
      set(CPACK_PACKAGE_VERSION_PATCH "6")
      set(targetDestDir "myDir")
      set(CPACK_GENERATOR "RPM")
      install(
          FILES "${CMAKE_CURRENT_SOURCE_DIR}/install.txt" "${CMAKE_CURRENT_SOURCE_DIR}/pre.py" "${CMAKE_CURRENT_SOURCE_DIR}/post.py"
          DESTINATION "${targetDestDir}"
      )
      set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/pre.sh")
      set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/post.sh")
      include(CPack)
  endif()
  </code></pre>