Notes |
|
(0021521)
|
Droscy
|
2010-07-28 12:54
|
|
This is the code that I use to get proper Debian name (maybe it can be usefull for the maintainer that will be assigned to this issue)
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
execute_process(COMMAND ${DPKG_PROGRAM} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${PROJECT_VERSION}-${CPACK_DEBIAN_PACKAGE_REVISION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
else(DPKG_PROGRAM)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${PROJECT_VERSION}-${CPACK_DEBIAN_PACKAGE_REVISION}_${CMAKE_SYSTEM_NAME}")
endif(DPKG_PROGRAM)
The variable ${CPACK_DEBIAN_PACKAGE_REVISION} handle the 'debian_revision' as reported here http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version [^] |
|
|
(0027674)
|
Eric NOULARD
|
2011-10-30 17:18
|
|
I'm trying to integrate this but it's hard to:
- avoid to break backward compatibility
- find the appropriate place to enforce such naming scheme
Droscy where do you use the code snippet you gave us:
1) in a CMakeLists.txt
2) in a CPack Project Config File
see: http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overall_usage_.28common_to_all_generators.29 [^]
Option 2) is the best place but it is up to a particular project to do it.
May be we should add a similar file which could be used "cmake-wide"...
I need more thinking |
|
|
(0027675)
|
Droscy
|
2011-10-31 05:40
(edited on: 2011-11-10 10:44) |
|
Actually I use that code at the end of CMakeLists.txt file, before setting the CPACK_DEBIAN_PACKAGE_xxx variables. I check if the system is Unix and then execute that code.
|
|
|
(0030660)
|
Eric NOULARD
|
2012-08-14 17:29
|
|
|
|
(0041069)
|
Domen Vrankar
|
2016-05-17 18:48
|
|
|
|
(0041170)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|