Skip to content

Commit

Permalink
Further extensions to the deb package generator
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Dec 23, 2023
1 parent b35483e commit e17caae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions cmake/cpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ if("${CPR_CPACK}" STREQUAL "DEB")
# Docs: https://cmake.org/cmake/help/latest/cpack_gen/deb.html
message(STATUS "CPack debian backend enabled")

set(CPACK_GENERATOR "DEB")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_NAME "${PROJECT_NAME}")
# set(CPACK_DEBIAN_FILE_NAME "${PROJECT_NAME}.deb")
set(CPACK_DEBIAN_PACKAGE_NAME "lib${PROJECT_NAME}")
set(CPACK_DEBIAN_FILE_NAME "lib${PROJECT_NAME}_${PROJECT_VERSION}.deb")
set(CPACK_DEBIAN_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "")
execute_process(COMMAND dpkg --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)

Expand All @@ -26,6 +26,13 @@ if("${CPR_CPACK}" STREQUAL "DEB")
set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PROJECT_HOMEPAGE_URL}")

set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git"
"/\\\\.github"
"/debian/"
"/.*build-.*/"
${PROJECT_BINARY_DIR})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
endif()

include(CPack)
2 changes: 1 addition & 1 deletion package-build/debian-libcpr/control
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Description: C++ wrapper around the libcurl library - runtime library
This package contains the runtime, shared library of cpr,
Curl for People.
.
The project is inspried by the Python Request project.
The project is inspired by the Python Request project.
Using the more expressive language facilities of C++11,
it captures the essence of making network calls into a
few concise idioms.

0 comments on commit e17caae

Please sign in to comment.