# == Environment ==
if (NOT CPACK_SYSTEM_NAME)
  set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_PROCESSOR}")
  if (CPACK_SYSTEM_NAME STREQUAL "x86_64")
    set(CPACK_SYSTEM_NAME "amd64")
  endif ()
endif ()

# == Basic information ==
set(CPACK_PACKAGE_NAME "shapeshifter-obfs4-server")
set(CPACK_PACKAGE_VENDOR "OperatorFoundation")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION "A transport plugin for OpenVPN for the obfs4 Pluggable Transport")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "obfs4 OpenVPN transport plugin")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
set(CPACK_PACKAGE_CONTACT "Dr. Brandon Wiley <brandon@operatorfoundation.org>")
set(CPACK_INSTALL_COMMANDS "env PREFIX=build make install")

# == Package config ==
set(CPACK_INSTALLED_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/build" "usr")
set(CPACK_GENERATOR "DEB")
set(CPACK_RESOURCE_FILE_LICENSE "LICENSE")
set(CPACK_RESOURCE_FILE_README "README.md")
set(CPACK_STRIP_FILES 1)

# == DEB package config ==
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_SYSTEM_NAME}")
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")

# == Source package config ==
set(CPACK_SOURCE_GENERATOR "DEB")
