diff --git a/CMakeLists.txt b/CMakeLists.txt index b2be860f3..3a6506cfe 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -769,7 +769,7 @@ if(NOT _x86 AND NOT _x86_64) install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION /etc/binfmt.d/) install(FILES ${CMAKE_SOURCE_DIR}/system/box86.box86rc DESTINATION /etc/) else() - install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION ${TERMUX_PATH}/usr/etc/binfmt.d/) + #install(FILES ${CMAKE_BINARY_DIR}/system/box86.conf DESTINATION ${TERMUX_PATH}/usr/etc/binfmt.d/) install(FILES ${CMAKE_SOURCE_DIR}/system/box86.box86rc DESTINATION ${TERMUX_PATH}/usr/etc/) endif() endif() @@ -823,7 +823,9 @@ string(REGEX MATCH "[0-9]" BOX86_REVISION ${TEMP_STRING}) set(CPACK_PACKAGE_VERSION_MAJOR ${BOX86_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${BOX86_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${BOX86_REVISION}) +if(NOT TERMUX) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst") +endif() if(_aarch64 OR _armhf OR _arm OR _armv8l) if(TERMUX) set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm") @@ -836,7 +838,14 @@ else() #probably wrong... execute_process(COMMAND "dpkg --print-architecture" OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE) endif() -set(CPACK_DEBIAN_FILE_NAME "${BOX86}-${BOX86_MAJOR}.${BOX86_MINOR}.${BOX86_REVISION}_Linux-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") +if(TERMUX) +set(CPACK_PACKAGING_INSTALL_PREFIX "${TERMUX_PATH}/usr") +endif() +if(NOT TERMUX) +set(CPACK_DEBIAN_FILE_NAME "${BOX86}-${BOX86_MAJOR}.${BOX86_MINOR}.${BOX86_REVISION}_${CMAKE_SYSTEM_NAME}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") +else() +set(CPACK_DEBIAN_FILE_NAME "${BOX86}-${BOX86_MAJOR}.${BOX86_MINOR}.${BOX86_REVISION}_Termux-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") +endif() INCLUDE(CPack) add_test(NAME bootSyscall COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/${BOX86}