
set(CPACK_PACKAGE_NAME "tbd")
set(CPACK_DEBIAN_DISPLAY_NAME "tbd")
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
set(CPACK_SYSTEM_NAME "iphoneos-arm")
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_SYSTEM_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY /usr)

set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_COMPRESSION_TYPE "lzma")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "okanon <flat.cydia37jins.pc@gmail.com>")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://twitter.com/@cxx_flags")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CPACK_SYSTEM_NAME})
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "firmware (>= 3.0)")
set(CPACK_DEBIAN_PACKAGE_SECTION "Development")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "A iPhoneOS command-line tool to create Text-Based Application Programming Interface (TAPI) files from existing binaries.")


file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/control" 
"Package: ${CPACK_PACKAGE_NAME} 
Name: ${CPACK_DEBIAN_DISPLAY_NAME}
Version: ${CPACK_PACKAGE_VERSION}
Architecture: ${CPACK_SYSTEM_NAME}
Section: ${CPACK_DEBIAN_PACKAGE_SECTION}
Priority: ${CPACK_DEBIAN_PACKAGE_PRIORITY}
Depends: ${CPACK_DEBIAN_PACKAGE_DEPENDS}
Description: ${CPACK_DEBIAN_PACKAGE_DESCRIPTION}
Homepage: ${CPACK_DEBIAN_PACKAGE_HOMEPAGE}
Maintainer: ${CPACK_DEBIAN_PACKAGE_MAINTAINER}
Author: ${CPACK_DEBIAN_PACKAGE_MAINTAINER}

")


set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/control")
include(CPack)
