1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00

feature: create debian and source packages (#44)

Added cpack to create debian and source packages. There are 3 packages:

webfuse-VERSION-Source.tar.gz: packaged sources
webfuse_VERSION_ARCH.deb: install webfuse libraries
webfuse-dev_VERSION_ARCH.deb: install headers, depends on libraries
This commit is contained in:
Falk Werner 2020-02-11 22:23:51 +01:00 committed by GitHub
parent 8abeedff16
commit 8ef90fb504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 9 deletions

View File

@ -41,3 +41,23 @@ include(webfuse_core)
include(webfuse_adapter)
include(webfuse_provider)
include(unit_tests)
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_DESCRIPTION "Websocket filesystem based on libfuse")
#set(CPACK_COMPONENTS_ALL libraries)
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Falk Werner")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_LIBRARIES_FILE_NAME "webfuse_${PROJECT_VERSION}_${CMAKE_SYSTEM_NAME}.deb")
set(CPACK_DEBIAN_LIBRARIES_PACKAGE_NAME "webfuse")
set(CPACK_DEBIAN_HEADERS_FILE_NAME "webfuse-dev_${PROJECT_VERSION}_${CMAKE_SYSTEM_NAME}.deb")
set(CPACK_DEBIAN_HEADERS_PACKAGE_NAME "webfuse-dev")
set(CPACK_DEBIAN_HEADERS_PACKAGE_DEPENDS "webfuse")
include(CPack)

View File

@ -82,9 +82,10 @@ Libs: -L\${libdir} -lwebfuse-adapter -l${FUSE3_LIBRARIES} -l${LWS_LIBRARIES} -l$
Cflags: -I\${includedir}"
)
install(TARGETS webfuse-adapter DESTINATION lib${LIB_SUFFIX})
install(FILES include/webfuse_adapter.h DESTINATION include)
install(DIRECTORY include/webfuse/adapter DESTINATION include/webfuse)
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig)
install(TARGETS webfuse-adapter DESTINATION lib${LIB_SUFFIX} COMPONENT libraries)
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-adapter.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT libraries)
install(FILES include/webfuse_adapter.h DESTINATION include COMPONENT headers)
install(DIRECTORY include/webfuse/adapter DESTINATION include/webfuse COMPONENT headers)
endif(NOT WITHOUT_ADAPTER)

View File

@ -15,4 +15,4 @@ set_target_properties(webfuse-core PROPERTIES OUTPUT_NAME webfuse-core)
target_include_directories(webfuse-core PUBLIC lib)
set_target_properties(webfuse-core PROPERTIES C_VISIBILITY_PRESET hidden)
install(DIRECTORY include/webfuse/core DESTINATION include/webfuse)
install(DIRECTORY include/webfuse/core DESTINATION include/webfuse COMPONENT headers)

View File

@ -47,9 +47,10 @@ Libs: -L\${libdir} -lwebfuse-provider -l${LWS_LIBRARIES} -l${JANSSON_LIBRARIES}
Cflags: -I\${includedir}"
)
install(TARGETS webfuse-provider DESTINATION lib${LIB_SUFFIX})
install(FILES include/webfuse_provider.h DESTINATION include)
install(DIRECTORY include/webfuse/provider DESTINATION include/webfuse)
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-provider.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig)
install(TARGETS webfuse-provider DESTINATION lib${LIB_SUFFIX} COMPONENT libraries)
install(FILES "${PROJECT_BINARY_DIR}/libwebfuse-provider.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig COMPONENT libraries)
install(FILES include/webfuse_provider.h DESTINATION include COMPONENT headers)
install(DIRECTORY include/webfuse/provider DESTINATION include/webfuse COMPONENT headers)
endif(NOT WITHOUT_PROVIDER)