MantisBT - CMake
View Issue Details
0011050CMakeCPackpublic2010-07-28 11:552016-06-10 14:21
Olaf van der Spek 
Domen Vrankar 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.12CMake 3.6 
0011050: CPack DEB: default to standard Debian package file names
At the moment the default package file name is like
"xbt-tracker-0.1.1-Linux.deb".
Could this be changed to "xbt-tracker_0.1.1_i386.deb"?
Note the underscore instead of minus as field separator and the architecture.
No tags attached.
related to 0009900closed Eric NOULARD Make CPack generic generator delegate the name of the file to specific generator 
related to 0011059closed Eric NOULARD [Deb] Don't require CPACK_PACKAGE_CONTACT 
related to 0012574closed Kitware Robot package name for the nameless component in DEB should not include the "-unspecified" extension 
child of 0012997closed Kitware Robot Provide a more flexible way to name package produced by CPack 
Issue History
2010-07-28 11:55Olaf van der SpekNew Issue
2010-07-28 12:54DroscyNote Added: 0021521
2010-07-30 07:42Eric NOULARDRelationship addedrelated to 0011059
2010-08-29 01:17Kovarththanan RajaratnamCategoryCMake => CPack
2010-12-15 11:13David ColeAssigned To => Eric NOULARD
2010-12-15 11:13David ColeStatusnew => assigned
2011-06-08 05:32Eric NOULARDRelationship addedrelated to 0009900
2011-10-30 17:18Eric NOULARDNote Added: 0027674
2011-10-31 05:40DroscyNote Added: 0027675
2011-11-10 10:44DroscyNote Edited: 0027675bug_revision_view_page.php?bugnote_id=27675#r447
2011-11-11 04:29Eric NOULARDRelationship addedrelated to 0012574
2012-02-25 18:03Eric NOULARDRelationship addedrelated to 0012997
2012-08-14 17:29Eric NOULARDNote Added: 0030660
2012-08-14 17:29Eric NOULARDTarget Version => CMake 2.8.10
2012-08-14 17:30Eric NOULARDRelationship replacedchild of 0012997
2012-10-02 14:57Eric NOULARDTarget VersionCMake 2.8.10 => CMake 2.8.11
2013-05-17 09:33Robert MaynardTarget VersionCMake 2.8.11 => CMake 2.8.12
2015-11-08 13:10Eric NOULARDAssigned ToEric NOULARD =>
2016-05-17 18:47Domen VrankarAssigned To => Domen Vrankar
2016-05-17 18:48Domen VrankarNote Added: 0041069
2016-05-17 18:48Domen VrankarStatusassigned => resolved
2016-05-17 18:48Domen VrankarFixed in Version => CMake 3.6
2016-05-17 18:48Domen VrankarResolutionopen => fixed
2016-06-10 14:21Kitware RobotNote Added: 0041170
2016-06-10 14:21Kitware RobotStatusresolved => closed

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   
This should be solved by 0012997.
(0041069)
Domen Vrankar   
2016-05-17 18:48   
CPackDEB now generates packages with deb standard package names:

https://cmake.org/gitweb?p=cmake.git;a=commit;h=3a55a0e [^]
https://cmake.org/gitweb?p=cmake.git;a=commit;h=316dd61 [^]
(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.