Make CPack work with new repository layout
This commit is contained in:
parent
c6e8052d93
commit
fff5b4b6e9
@ -7,49 +7,6 @@ include(utils.cmake)
|
||||
require_gcc_version(4.8)
|
||||
|
||||
add_subdirectory(vendor)
|
||||
add_subdirectory(gitversion)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
||||
# Fix debfiles permissions. Unfortunately, git doesn't store file permissions.
|
||||
# When installing the .deb package and these files have the wrong permissions, the package manager complains.
|
||||
EXECUTE_PROCESS(COMMAND /bin/bash -c "chmod 0755 ${CMAKE_CURRENT_SOURCE_DIR}/debfiles/*")
|
||||
|
||||
INSTALL(TARGETS ${BII_src_main_TARGET}
|
||||
DESTINATION bin
|
||||
CONFIGURATIONS Release)
|
||||
|
||||
SET(CPACK_GENERATOR TGZ DEB RPM)
|
||||
SET(CPACK_PACKAGE_NAME "cryfs")
|
||||
SET(CPACK_PACKAGE_VERSION "${GITVERSION_VERSION_STRING}")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Encrypt your files and store them in the cloud.")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION "CryFS encrypts your files, so you can safely store them anywhere. It works well together with cloud services like Dropbox, iCloud, OneDrive and others.")
|
||||
SET(CPACK_PACKAGE_CONTACT "Sebastian Messmer <messmer@cryfs.org>")
|
||||
SET(CPACK_PACKAGE_VENDOR "Sebastian Messmer")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
|
||||
IF(WIN32 AND NOT UNIX)
|
||||
# There is a bug in NSI that does not handle full unix paths properly. Make
|
||||
# sure there is at least one set of four (4) backlasshes.
|
||||
#SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
|
||||
#SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\cryfs.exe")
|
||||
#SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} CryFS")
|
||||
#SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.cryfs.org")
|
||||
#SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.cryfs.org")
|
||||
#SET(CPACK_NSIS_CONTACT "messmer@cryfs.org")
|
||||
#SET(CPACK_NSIS_MODIFY_PATH ON)
|
||||
ELSE(WIN32 AND NOT UNIX)
|
||||
SET(CPACK_STRIP_FILES "bin/cryfs")
|
||||
SET(CPACK_SOURCE_STRIP_FILES "")
|
||||
ENDIF(WIN32 AND NOT UNIX)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "cryfs" "CryFS")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "utils")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "fuse")
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.cryfs.org")
|
||||
SET(CPACK_RPM_PACKAGE_LICENSE "LGPLv3")
|
||||
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postrm")
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
||||
add_subdirectory(cpack)
|
||||
|
16
README.md
16
README.md
@ -51,13 +51,19 @@ Requirements
|
||||
- GCC version >= 4.8 or Clang (TODO which minimal version?)
|
||||
- CMake version >= 3.3
|
||||
- libcurl4 (including development headers)
|
||||
- Boost libraries filesystem, system, chrono, program_options, thread in version >= 1.56
|
||||
- Crypto++ >= 5.6.3 (TODO Lower minimal version possible?)
|
||||
- libFUSE >= 2.8.6 (including development headers)
|
||||
- Boost libraries version >= 1.56 (including development headers)
|
||||
- filesystem
|
||||
- system
|
||||
- chrono
|
||||
- program_options
|
||||
- thread
|
||||
- Crypto++ version >= 5.6.3 (including development headers) (TODO Lower minimal version possible?)
|
||||
- libFUSE version >= 2.8.6 (including development headers)
|
||||
|
||||
You can use the following commands to install these requirements
|
||||
|
||||
# Ubuntu
|
||||
$ sudo apt-get install libfuse-dev
|
||||
TODO Other install commands
|
||||
$ sudo apt-get install libcurl4-openssl-dev libboost-filesystem-dev libboost-system-dev libboost-chrono-dev libboost-program-options-dev libboost-thread-dev libcrypto++-dev libfuse-dev
|
||||
|
||||
# Fedora
|
||||
TODO
|
||||
|
39
cpack/CMakeLists.txt
Normal file
39
cpack/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
include (../vendor/gitversion/gitversion-1.8/cmake.cmake)
|
||||
|
||||
# Fix debfiles permissions. Unfortunately, git doesn't store file permissions.
|
||||
# When installing the .deb package and these files have the wrong permissions, the package manager complains.
|
||||
execute_process(COMMAND /bin/bash -c "chmod 0755 ${CMAKE_CURRENT_SOURCE_DIR}/debfiles/*")
|
||||
|
||||
set(CPACK_GENERATOR TGZ DEB RPM)
|
||||
set(CPACK_PACKAGE_NAME "cryfs")
|
||||
set(CPACK_PACKAGE_VERSION "${GITVERSION_VERSION_STRING}")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Encrypt your files and store them in the cloud.")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "CryFS encrypts your files, so you can safely store them anywhere. It works well together with cloud services like Dropbox, iCloud, OneDrive and others.")
|
||||
set(CPACK_PACKAGE_CONTACT "Sebastian Messmer <messmer@cryfs.org>")
|
||||
set(CPACK_PACKAGE_VENDOR "Sebastian Messmer")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
|
||||
if(WIN32 AND NOT UNIX)
|
||||
# There is a bug in NSI that does not handle full unix paths properly. Make
|
||||
# sure there is at least one set of four (4) backlasshes.
|
||||
#set(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
|
||||
#set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\cryfs.exe")
|
||||
#set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} CryFS")
|
||||
#set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.cryfs.org")
|
||||
#set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.cryfs.org")
|
||||
#set(CPACK_NSIS_CONTACT "messmer@cryfs.org")
|
||||
#set(CPACK_NSIS_MODIFY_PATH ON)
|
||||
else(WIN32 AND NOT UNIX)
|
||||
set(CPACK_STRIP_FILES "bin/cryfs")
|
||||
set(CPACK_SOURCE_STRIP_FILES "")
|
||||
endif(WIN32 AND NOT UNIX)
|
||||
set(CPACK_PACKAGE_EXECUTABLES "cryfs" "CryFS")
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "utils")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "fuse")
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.cryfs.org")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "LGPLv3")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postrm")
|
||||
|
||||
include(CPack)
|
@ -59,3 +59,8 @@ add_executable(${PROJECT_NAME} main.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_lib)
|
||||
target_enable_style_warnings(${PROJECT_NAME})
|
||||
target_activate_cpp14(${PROJECT_NAME})
|
||||
|
||||
install(TARGETS cryfs
|
||||
COMPONENT cryfs-cli
|
||||
DESTINATION bin
|
||||
CONFIGURATIONS Release)
|
||||
|
@ -1,5 +1,3 @@
|
||||
include(CTest)
|
||||
|
||||
if (BUILD_TESTING)
|
||||
include_directories(../src)
|
||||
|
||||
|
2
vendor/gitversion/CMakeLists.txt
vendored
2
vendor/gitversion/CMakeLists.txt
vendored
@ -1 +1 @@
|
||||
include(gitversion-1.7/cmake.cmake)
|
||||
include(gitversion-1.8/cmake.cmake)
|
||||
|
14
vendor/googletest/CMakeLists.txt
vendored
14
vendor/googletest/CMakeLists.txt
vendored
@ -1,6 +1,10 @@
|
||||
add_subdirectory(gtest-1.7.0)
|
||||
include(CTest)
|
||||
|
||||
project (googletest)
|
||||
add_library(${PROJECT_NAME} dummy.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} gtest gmock gmock_main)
|
||||
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory(gtest-1.7.0)
|
||||
|
||||
project (googletest)
|
||||
add_library(${PROJECT_NAME} dummy.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} gtest gmock gmock_main)
|
||||
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
||||
endif (BUILD_TESTING)
|
||||
|
Loading…
x
Reference in New Issue
Block a user