foreach(component_name ${CPACK_COMPONENTS_ALL})
    string(TOUPPER ${component_name} COMPONENT)
    set(CPACK_COMPONENT_${COMPONENT}_DESCRIPTION "SkybilityHA drbd cstate monitor resource for skybiltiyha 2.8")

    if(NOT CPACK_RPM_${COMPONENT}_PACKAGE_NAME)
        set(CPACK_RPM_${COMPONENT}_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${component_name}")
    endif()
    set(CPACK_DEBIAN_${COMPONENT}_PACKAGE_NAME "${CPACK_RPM_${COMPONENT}_PACKAGE_NAME}")

    if(NOT CPACK_RPM_${COMPONENT}_PACKAGE_ARCHITECTURE)
        set(CPACK_RPM_${COMPONENT}_PACKAGE_ARCHITECTURE ${CPACK_RPM_PACKAGE_ARCHITECTURE})
    endif()
    if(NOT CPACK_DEBIAN_${COMPONENT}_PACKAGE_ARCHITECTURE)
        set(CPACK_DEBIAN_${COMPONENT}_PACKAGE_ARCHITECTURE "amd64")
    endif()

    if(NOT CPACK_RPM_PACKAGE_RELEASE)
        set(CPACK_RPM_${COMPONENT}_FILE_NAME "${CPACK_RPM_${COMPONENT}_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CPACK_RPM_${COMPONENT}_PACKAGE_ARCHITECTURE}.rpm")
        set(CPACK_DEBIAN_${COMPONENT}_FILE_NAME "${CPACK_DEBIAN_${COMPONENT}_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CPACK_DEBIAN_${COMPONENT}_PACKAGE_ARCHITECTURE}.deb")

    else()
        set(CPACK_RPM_${COMPONENT}_FILE_NAME "${CPACK_RPM_${COMPONENT}_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_${COMPONENT}_PACKAGE_ARCHITECTURE}.rpm")
        set(CPACK_DEBIAN_${COMPONENT}_FILE_NAME "${CPACK_DEBIAN_${COMPONENT}_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_DEBIAN_${COMPONENT}_PACKAGE_ARCHITECTURE}.deb")
    endif()
endforeach()